dojo.connect(this.GISmap, 'onLayerAdd', jQuery.proxy(function() { this.afterLoad(); }, this));
afterLoad: function() { var overviewMapDijit = new esri.dijit.OverviewMap({ map: this.GISmap, baseLayer: layer, visible: false, attachTo: "top-right", expandFactor: 2.5 }); overviewMapDijit.startup(); }
afterLoad: function() { if (this.GISmap.loaded) { var overviewMapDijit = new esri.dijit.OverviewMap({ map: this.GISmap, baseLayer: layer, visible: false, attachTo: "top-right", expandFactor: 2.5 }); overviewMapDijit.startup(); } else{ //nothing. } }
if (this.GISmap.loaded) { var createOverviewMap = function() { overviewMapDijit = new esri.dijit.OverviewMap({ map: this.GISmap, baseLayer: layer, visible: false, attachTo: "top-right", color: "#D84E13", width: 300, height: 250, expandFactor: 2 }); overviewMapDijit.startup(); dojo.style(dojo.byId("status"), "display", "none"); }; if (layer.loaded) { createOverviewMap(); } else { dojo.connect(layer, "onLoad", createOverviewMap); } }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.