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); }
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.