get legend from webmap

2190
1
06-25-2012 01:45 AM
Chrisvan_Aart
New Contributor
Dear All,

We cannot het the legend from a webmap.

We are displaying a webmap in a mapview.

self.webmap = [AGSWebMap webMapWithItemId:theId credential:nil];
[self.webmap openIntoMapView:self.mapView];
  

With:

- (void)mapView:(AGSMapView *) mapView didLoadLayerForLayerView:(UIView<AGSLayerView> *) layerView {
//Add legend for each layer added to the map
        [[DataModel getInstance].legendDataSource addLegendForLayer:(AGSLayer *)layerView.agsLayer];
}

We got this construction from this: http://www.arcgis.com/home/item.html?id=901ca5cbcc6e4fe9bee960136c5971ba

However, we only get the legend information from the basemap.

Can somebody help?

Thanks,

Chris
0 Kudos
1 Reply
NimeshJarecha
Esri Regular Contributor
What is the type of all your operational layers? i.e. Dynamic map service layer, tiled layer, feature layer etc? Which version of the server they belong to?

Regards,
Nimesh
0 Kudos