I am trying to add layers dynamically to the map component by using the following code with a button click.....
for(var i:int=0;i<4;i++)
{
ArcGISDynamicserviceLayer dyn=new ArcGISDynamicLayer(//URL);
dyn.VisibleLayers=//Some visible Layers array collection....
myMap.addLayer(dyn,i);
}
When i am adding first time it is adding successfully....
But when i remove all the layers i have added and i tried add another set of layers like this with another button click the new set of layers are not visible on the map.....
When i am checking the number of layers on map it showing the count and all urls also....What is the reason for this.....
Thanks & Regards
Srinivas..............