Overlapping labels for map.basemap and basemap gallery basemap

4270
5
05-19-2015 09:52 AM
deleted-user-m6DuRVNpNiGp
New Contributor III

Hello --

I've got an ArcGIS Javascript app (not publicly available at the moment) and I'm having trouble with the interplay between the original basemap selected for the map and new maps chosen using the basemap gallery. My original basemap is dark-gray. However, when I choose basemaps using the basemap gallery, it appears that the municipality labels from the dark-gray layer remain and overlap labels from the currently selected basemap.

Hopefully these screenshots illuminate the problem. In the first with the dark-gray basemap there is a label for Durham. In the second with the streets basemap that same Durham label persists, and it's overlapping the "Durham" label from the streets basemap.

Thoughts? Thanks in advance.

before.PNGafter.PNG

- geoff

0 Kudos
5 Replies
thejuskambi
Occasional Contributor III

Your Basemap are they a single layer or multiplelayers with isReference=true?

deleted-user-m6DuRVNpNiGp
New Contributor III

I'm using the standard Esri baemaps -- the basemap that I start with is included as a parameter in the map constructor, and the other basemaps are the standard basemaps included in the Basemap gallery. I am not sure where the isReference parameter is used.

A workaround that I just found was, everytime I select a basemap using the basemap gallery, use map.setBasemap() to set the basemap to the same (or similar) basemap. But it seems clunky.

0 Kudos
by Anonymous User
Not applicable

I have also encountered this. It only happens to me when I set the original map's basemap to one with a reference layer (for instance the dark grey map or the hybrid aerial imagery/labels basemap). If the original basemap does not have the separate reference layer I never encounter the problem.

I didn't ever report this as a bug or dig deeper. I simply made my first map the tiled topo with labels embedded in the image. I don't have issues switching to any basemap as long as I don't start with one that has separate labels.

It seems the basemap gallery doesn't account for the reference layer if it's the first basemap which causes this issue.

ZoeZaloudek
Occasional Contributor

It looks like this was reported as a bug:

Bug in Basemap Gallery dijit

0 Kudos
TracySchloss
Frequent Contributor

I've noticed issues just using the basemaps in Desktop.  I'll switch between 'hybrid' and streetmap, for example, and the labels for the hybrid will still be on.  It's like they're a vector image draped over raster and their visibility is handled independently. I've had to expand into the first basemap and manually turn off the labels.

It doesn't fix your situation here, but it does speak to the fact that maybe the problem is from how the basemaps are authored as much as how you interact with them programmatically.

0 Kudos