laptop and a wrench

Bug

A reference layer from multiple basemaps stay on a map when the basemap is switched in the basemap gallery.

Last Published: June 29, 2015 ArcGIS API for JavaScript
Bug ID Number BUG-000085714
SubmittedFebruary 27, 2015
Last ModifiedDecember 1, 2020
Applies toArcGIS API for JavaScript
Version found3.12
Operating SystemWindows
Operating System Version7 64 Bit
StatusKnown Limit

Additional Information

This is a known limit with 3.x and will be addressed in 4.x.

Workaround

Set one of the basemaps as a starting basemap, and add the following code in the application : var bool = true; // declare this globally basemapGallery.on("selection-change", function() { if(bool == true){ map.removeLayer(map.getLayer("layer1")); bool = false; // Since this happens only ones we don't need it anymore. } });

Steps to Reproduce

Bug ID: BUG-000085714

Software:

  • ArcGIS API for JavaScript

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic