AnsweredAssumed Answered

Displaying callouts

Question asked by fauphi on Nov 9, 2012
Latest reply on Nov 19, 2012 by DGoyal-esristaff

I want to display callouts on my map.
The map and the layer for the graphic objects is displayed with this code:
NSString* passauStreetMapUrl = @""; NSString* passauPoiLayerUrl = @""; NSString* worldMapUrl = @"";  //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];

Now I want to add callout to the graphic objects on self.layerPassauPoi.
Is it possible to get the graphic objects out of the layerPassauPoi.visibleLayers (AGSDynamicMapServiceLayer) array and set the "infoTemplateDelegate" on these graphic objects? Or maybe not from the visibleLayers-array but from an other part of the AGSDynamicMapServiceLayer?
Or is this approach completely wrong?

It would be great if someone could give me a little hint!:)