3

I've been experimenting with the My First iOS app example, trying to get it to display a Bing map layer I created on ArcGIS.com. However, the layer doesn't display. In the sample app's code, when it says:

NSURL *mapUrl = [NSURL URLWithString:@"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"];
 AGSTiledMapServiceLayer *tiledLyr = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:mapUrl];
 [self.mapView addMapLayer:tiledLyr withName:@"Tiled Layer"];

what am I supposed to replace the mapUrl from? The bit.ly link created through the share function on ArcGIS.com doesn't work, since it links directly to a map viewer displaying the map. I'd like to get the map directly to put into my sample iOS app.

1 Answer 1

2

It appears to me that your problem is more with the licensing that finding the correct REST endpoint: http://www.esri.com/software/arcgis/arcgisonline/bing-maps.html , particularly the bit about ArcGIS Web Mapping.

6
  • I understand, but what URL do I use as the endpoint anyways? I'm just created a map with ArcGIS.com, what address do I use? Commented Nov 4, 2010 at 7:23
  • None if you have Bing on your map.
    – GuillaumeC
    Commented Nov 4, 2010 at 7:33
  • Practically, if you want to get this map on your app: arcgis.com/home/item.html?id=153c17de00914039bb28f6f6efe6d322 , you will need to add the layers at the bottom of the page. The layering is done client side when all layers are pulled from the server.
    – GuillaumeC
    Commented Nov 4, 2010 at 7:34
  • Okay, so this is the map I've created: arcgis.com/home/webmap/… what exactly would I have to do with the sample app in order to display it? Do I have to instantiate it with both of the layers it's made of? And then do I have to get it to display the coordinates at the zoom level I've gotten it to in the map viewer? If so, then what's the point of even using ArcGIS.com to make a map? Commented Nov 4, 2010 at 8:36
  • The point is, as I understand it, what you just did: provide a link to your map. And also, open it in one click in ArcGIS Online Explorer and ArcMap. I don't think there is a way to pass it as a parameter to one of the web APIs.
    – GuillaumeC
    Commented Nov 4, 2010 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.