AnsweredAssumed Answered

JS API 4: View zoom limits show odd behaviour

Question asked by JKingesriaustralia-com-au-esridist Employee on Nov 1, 2016



Has anyone else noticed this, and/or have a fix for it?


If you set minZoom and maxZoom on your View object, like so:


var view = new MapView({
   container: "viewDiv",
   map: map,
   center: [15, 65],
   constraints: {
      minZoom: 5,
      maxZoom: 19,
      snapToZoom: true

Then when you reach the minZoom level (large scale) and continue to try to zoom further out, the map just randomly pans around as you scroll. When you reach the maxZoom level (small scale) and continue to zoom further in, then the zoom snaps back out to some other zoom level (mine is snapping back out to level 14).


Does anyone have a strategy for handling this?