gkaradagan

Legends of dynamiclayer

Discussion created by gkaradagan on Apr 15, 2014
hi everyone, i tried to get legends of DynamicLayer but i have error.

Declaration Dynamic Layer :
ArcGISDynamicMapServiceLayer binaKullanim = new ArcGISDynamicMapServiceLayer(this.getResources().getString(R.string.Tematik_Bina_Kullanim_Turu));
Add mapview:
mMapView.addLayer(binaKullanim);

Initialize layerinfo :
ArcGISLayerInfo[] newLayerInfo = binaKullanim.getAllLayers();

try to read
Log.v("gk", "gk"+newLayerInfo[0].getLegend().get(0).getLabel()); it gives me error nullpointerexeption
but when i try read layername it gives me correct
newLayerInfo[0].getName()

Outcomes