NSString* passauStreetMapUrl = @"http://www.geoportal.passau.de/ArcGIS/rest/services/STADTPLAN/MapServer"; NSString* passauPoiLayerUrl = @"http://www.geoportal.passau.de/ArcGIS/rest/services/APPDATEN/MapServer"; NSString* worldMapUrl = @"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"; //set this class as the delegate for the callout (popups) self.mapView.calloutDelegate = self; //set this class as the delegate for the mapview self.mapView.layerDelegate = self; //set wrap around vor the world map view self.mapView.wrapAround = YES; //create url NSURL* urlPassauMap = [NSURL URLWithString: passauStreetMapUrl]; NSURL* urlPassauPoiLayer = [NSURL URLWithString: passauPoiLayerUrl]; //create tiled(PassauAirMap) and dynamic(PassauMap with layers) maps self.layerPassauMap = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL: urlPassauMap]; self.layerPassauPoi = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL: urlPassauPoiLayer]; //add maps to view self.lyrView = [self.mapView addMapLayer:self.layerPassauMap withName:@"layerPassauMap"]; self.lyrView = [self.mapView addMapLayer:self.layerPassauPoi withName:@"layerPassauPoi"]; //set certain layers of the PassauMap to visible self.layerPassauPoi.visibleLayers = [NSArray arrayWithObjects:[NSNumber numberWithInt:0], nil];
Solved! Go to Solution.