pml

Opening maps from arcgis.com

Discussion created by pml on Dec 1, 2010
Latest reply on Dec 3, 2010 by DGoyal-esristaff
I have a handful of maps that have been built on arcgis.com. These maps contain basemap content from ESRI as well as content from our ArcGIS server. Of course those maps can be accessed using the OEM ArcGIS for iOS application. But it would be nice if I could use those maps from arcgis.com in my custom application. With a variation of the code below, is it possible to load a map from the arcgis.com site in my custom application? Perhaps by changing the http address to point to http://www.arcgis.com/sharing/content/items/<item_id>/data?

MapViewController.h

#define kTiledMapServiceURL @"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"

MapViewController.m

- (void)viewDidLoad 
{
    [super viewDidLoad];
 
 AGSTiledMapServiceLayer *tiledLayer = [[AGSTiledMapServiceLayer alloc] initWithURL:[NSURL 
URLWithString:kTiledMapServiceURL]];
 
 [self.mapView1 addMapLayer:tiledLayer withName:@"Tiled Layer"];
 
 [tiledLayer release];

}

Outcomes