When I begin my application with Street as basemap layer and two more feature layers, I have 3 layers in total
map.getLayer().size
But when I change the basemap layer to Gray_base or Hybrid:
map.setMapOptions(new MapOptions(MapType.GRAY_BASE));
One more layer is added (4 after the change). If I change again to other basemap not being GRAY_BASE or HYBRID the extra layer is removed (having 3 as initially)
Why this happens? I think it's not an error in my code because even the sample code (the MapOptionsApp example) shows this behavior.
What can I do to avoid this extra layer?
Beforehand thanks a lot.
Solved! Go to Solution.
Hi Edgar,
This is because the selected basemap consists of two layers: Base (Background) and Reference (Labels).
You can examine these using basemap item definition.
Hope this clarifies your concern,
Regards,
Adam
Hi Edgar,
This is because the selected basemap consists of two layers: Base (Background) and Reference (Labels).
You can examine these using basemap item definition.
Hope this clarifies your concern,
Regards,
Adam
thanks a lot. I'll make provision for the use of these basemaps