Solved! Go to Solution.
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); }