Select to view content in your preferred language

JS API 4: View zoom limits show odd behaviour

1421
0
11-01-2016 06:32 PM
JordanKing3
New Contributor III

Hey,

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?

Cheers,

Jordan

0 Kudos
0 Replies