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); }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.