Could you please assist with how we can fetch legends from the Map Tiles service?
Below is the sample code, we have consumed the tile by URL which is rendered successfully to the map view.
ArcGISTiledLayer layer = new ArcGISTiledLayer(new Uri(LayerUrl)) ;
var legends = layer.GetLegendInfosAsync();
However, GetLegendInfosAsync() does not return the legend associated with the tile service.
Thanks :) in advance
Solved! Go to Solution.
The legend is provided by sublayers so you have to get the SubLayers, loop on the sublayers, and call GetLegendInfosAsync on each sublayer (even if frequently a tiled layer has only one sublayer)
Thanks for your response. After trying GetLegendInfosAsync () on the sublayer it returned null as a result and Status as Waiting for Activation. Anything we need to configure on on the Tile Service? see below snapshot