Reputation: 55
I came across a strange ol3 behaviour using the extent property of the ol.View to restrict the map navigation bounds.
To reproduce the error you should create a Map with a limited extent of the 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 an example with a modified version of the "WMS custom tile grid 512x256" example on jsfiddle [ http://jsfiddle.net/dpynhg67/1/ ]
The extent is limited to the US, follow this steps to reproduce the bug:
Is this the wanted behaviour of the map? Do you have any suggestion on how to force the View to the extent?
Because as I remember OL2 behaved differently, while zooming the map was also panned to respect the extent.
Upvotes: 4
Views: 268