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:
ahocevar
2012-09-27 12:05:53 +02:00
parent f78cad0d77
commit caaec7c366
2 changed files with 8 additions and 31 deletions

View File

@@ -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);