If the BasemapGallery widget is initialized with a basemap that has a reference service for labels, the labels continue to display even after switching to other basemaps.
Duplicate of BUG-000089550 : This is a duplicate of existing bug that is open and is estimated to be fixed for 4.0.
解决办法
After initializing the gallery, set the basemap to the desired basemap option:dojo.connect(basemapGallery, "onLoad", function(){ dojo.forEach(basemapGallery.basemaps, function(basemap) { //Add a menu item for each basemap, when the menu items are selected dijit.byId("basemapMenu").addChild( new dijit.MenuItem({ label: basemap.title, onClick: dojo.hitch(this, function() { this.basemapGallery.select(<a href="http://basemap.id" target="_blank">basemap.id</a>); }) }) ); }); basemapGallery.select("basemap_3"); // workaround