Dynamic legend with ArcGISLocalTiledLayer

2702
2
04-08-2015 12:24 AM
shabbirsiddiqui2
New Contributor III

Hi,

I am trying to create dynamic legend with ArcGISLocalTiledLayer but its not returning any layer inside it.

private ArcGISLocalTiledLayer localTiledLayer;

String basemap = landDataFile + File.separator + offlineDataSDCardDirName + File.separator + filename;

localTiledLayer = new ArcGISLocalTiledLayer(basemap);

for (ArcGISLayerInfo layerInfo : localTiledLayer .getLayers()) {

}

I am following the example of MapLegend which is done with ArcGISDynamicMapServiceLayer.

Please assist me where i am getting wrong .

Thanks

0 Kudos
2 Replies
YousefQuran
Occasional Contributor

Dear shabbir, I do not know if this is the reason of the problem, but make sure that you run this code after make sure that all layers has been loaded by using add-layers-result listener or some thing related to this. I hope its works, otherwise post the full code if you can. Regards. 

0 Kudos
shabbirsiddiqui2
New Contributor III

Dear Yusuf,

Thanx for reply, i am using the same example as given in the MapLegend.

i have attaching the Java code . Please have a look .

Thanks

0 Kudos