dojo.connect(map, "onZoomEnd", catchZoom2); dojo.connect(map, "onZoomStart", catchZoom);
//catch bad zooms//get map extent at the start of the zoom function catchZoom(extent,zoomFactor) { oldExtent = new esri.geometry.Extent(); oldExtent = extent; } //if the zoomfactor is too big, assume it is an error and go back to the original function catchZoom2(extent, zoomFactor) { console.debug(zoomFactor) if (zoomFactor > 400) { map.setExtent(startExtent); }
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.