Use the map's zoom method instead of our own
This also allows us to get rid of the resolutions constraint and configuration.
This commit is contained in:
@@ -21,4 +21,4 @@ var map = new ol.Map(document.getElementById('map'), {
|
||||
layers: new ol.Collection([layer]),
|
||||
zoom: 0
|
||||
});
|
||||
var zoom = new ol.control.Zoom(map, layer.getSource().getResolutions());
|
||||
var zoom = new ol.control.Zoom(map, 4);
|
||||
|
||||
Reference in New Issue
Block a user