Select to view content in your preferred language

Why Gray and Hybrid basemaps count for 2 layers?

1409
2
Jump to solution
03-02-2017 02:11 PM
EdgarCanul
Occasional Contributor

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.

0 Kudos
1 Solution

Accepted Solutions
nita14
by
Frequent Contributor

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

View solution in original post

0 Kudos
2 Replies
nita14
by
Frequent Contributor

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

0 Kudos
EdgarCanul
Occasional Contributor

thanks a lot. I'll make provision for the use of these basemaps

0 Kudos