Scale restrictions not followed when scaling

I came across the strange behavior of ol3, using the ol.View degree property to limit the boundaries of map navigation.

To reproduce the error, you must create a map with a limited degree ol.View, like this ..

var map = new ol.Map({
    layers: layers,
    target: 'map',
    view: new ol.View({
      center: [-10997148, 4569099],
      extent: [-13884991, 2870341, -7455066, 6338219]
    })
});

Here is an example with a modified version of the WMS custom grid grid 512x256 example on jsfiddle [ http://jsfiddle.net/dpynhg67/1/ ]

The degree is limited to the United States, follow these steps to reproduce the error:

  • Zoom out to see also the euro.
  • Position the pointer somewhere in Europe and zoom in with the mouse wheel (you can zoom outside).
  • As soon as you try to pan, the view moves to the volume specified in the view

? - , ?

, , OL2 -, , .

+4
1

, , . v3.21.0. , , # 5824.

+2

All Articles