dojo.connect(basemapGallery, "onSelectionChange", function () { //close the basemap window when an item is selected //destroy and recreate the overview map - so the basemap layer is modified. destroyOverview(); dijit.byId('basemapBtn').closeDropDown(); });
function destroyOverview(){ var ov = dijit.byId('overviewMap'); if(ov){ var vis = ov.visible; ov.destroy(); addOverview(vis); } }
function addOverview(isVisible) { var overviewMapDijit = new esri.dijit.OverviewMap({ map: map, attachTo: "top-right", opacity: 0.5, color: "#000000", expandfactor: 2, maximizeButton: false, visible: isVisible, id:'overviewMap' }); overviewMapDijit.startup(); }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.