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(); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.