Adding zoom control

This commit is contained in:
ahocevar
2012-09-26 18:27:45 +02:00
parent 47c343ce4f
commit e390ff80ea
2 changed files with 127 additions and 0 deletions
+2
View File
@@ -5,6 +5,7 @@ goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.RendererHint');
goog.require('ol.control.Zoom');
goog.require('ol.layer.MapQuestOpenAerial');
@@ -20,3 +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.getStore().getResolutions());