[ATTACH=CONFIG]31055[/ATTACH]I tried to modify the WebmapSample to display the following image from the World Imagery gallery:http://www.arcgis.com/home/webmap/viewer.html?webmap=d802f08316e84c6592ef681c50178f17&extent=-122.57...Based on my inspection of the URL I needed to create an AGSEnvelope object which contains the extent parameters displayedin the URL.Extent Parameters:Xmin:-122.578926ymin:37.720084 xmax:-122.258263ymax:37.927545My modification of the application involved:1. Added a string constant for the id of map of interest2. Added AGSMapViewLayerDelegate protocol to WebmapSampleViewController.h3. Set the WebmapSampleView controller to be the delegate object for the protocol mentioned. 3. Added the function -(void)mapViewDidLoad: (AGSMapView*)mapView in WebmapSampleViewController.m (code snippet below)- (void)mapViewDidLoad:(AGSMapView *)mapView { NSURL * goldengateURL = [NSURL URLWithString:@"http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"]; AGSTiledMapServiceLayer * tiledLayer = [[AGSTiledMapServiceLayer alloc] initWithURL:goldengateURL]; [self.mapView addMapLayer:tiledLayer withName:@"Tiled Layer"]; AGSSpatialReference *sr = [AGSSpatialReference spatialReferenceWithWKID:102100]; AGSEnvelope * env = [AGSEnvelope envelopeWithXmin:-122.578926 ymin:37.720084 xmax:-122.258263 ymax:37.927545 spatialReference:sr]; [self.mapView zoomToEnvelope:env animated:YES]; }
When the program is invoked the contents of the display turn black and purple. This issue was also highlightedin the following forum post:http://forums.arcgis.com/threads/75752-world-imagery-service-canadian-imagery-weirdly-purpleI need to know if I have modified the code correctly. I did not want to assume that it was directly related to the previous post.Notice that I set the infrastructure for the zoom in the delegate method. I have seen other posts on resource examples that do this in the view controllers - (void)viewDidLoad method.I am hoping there is a work around for this. I need to zoom. It would be a waste if all of this high resolution imagery could not be processed.