View / add a constrainResolution option

This introduces a breaking change.

This options replaces the various `constrainResolution` options on interactions
and the `fit` method.

Since constraints are now the responsibility of the View, the fact that intermediary
zoom levels are allowed or not is now set in the view options.

By default, the view resolution is unconstrained.
This commit is contained in:
Olivier Guyot
2019-01-20 16:05:10 +01:00
parent 48ad1ffcbf
commit 49662b019c
11 changed files with 120 additions and 126 deletions

View File

@@ -7,7 +7,7 @@ import OSM from '../src/ol/source/OSM.js';
const map = new Map({
interactions: defaultInteractions({
constrainResolution: true, onFocusOnly: true
onFocusOnly: true
}),
layers: [
new TileLayer({