How to get legend images from map service info of any layer in SDK v100.x

200
1
04-30-2018 07:34 AM
MuruganandhamKuppan1
New Contributor III

Hi, 

I need to get legend images from map service info. In Previous run time SDK v 10.x, we have used to get the images as below.

-(void)Save:(AGSMapServiceInfo*)mapServiceInfo{for (AGSMapServiceLayerInfo* info in mapServiceInfo.layerInfos){   [self saveInfo:mapServiceInfo images:info.legendImages labels:info.legendLabels];
}
}

I tried to get the legend images from the below layer

AGSArcGISMapImageLayer

But, no luck. Im not able to find any document regarding this, even in migration document. Kindly give some suggestions to find out the classes replaced in latest run time SDK for iOS.

Thanks

0 Kudos
1 Reply
MarkDostal
Esri Contributor

Thank you for your question!  We do have equivalent functionality in the 100.2.x release of the Runtime SDK.  It can be found in the AGSLayerContent protocol on all AGSLayer subclasses.  You can use the fetchLegendInfos: method to retrieve the legend information for a layer/sublayer.

Take a look at this GeoNet comment:  https://community.esri.com/thread/211478-toc-equivalent-in-sdk-100x#comment-758200 

If that doesn't answer your question, or you need clarification, please let me know.

Mark