Make ZoomSlider use View2D value/resolution funcs

This commit is contained in:
Éric Lemoine
2013-04-08 12:51:14 +02:00
parent 6163f05b2b
commit 516f21eb17
3 changed files with 13 additions and 115 deletions

View File

@@ -12,12 +12,9 @@ goog.require('ol.source.MapQuestOpenAerial');
* @return {ol.Map} The ol.Map instance.
*/
var createMap = function(divId) {
var source, layer, map, zoomslider, resolutions, minRes, maxRes;
var source, layer, map, zoomslider, resolutions;
source = new ol.source.MapQuestOpenAerial();
// These are the min and max resolutions of MapQuestOpenAerial
minRes = 0.5971642834779395;
maxRes = 156543.03392804097;
layer = new ol.layer.TileLayer({
source: source
});
@@ -30,8 +27,6 @@ var createMap = function(divId) {
})
});
zoomslider = new ol.control.ZoomSlider({
minResolution: minRes,
maxResolution: maxRes,
map: map
});
return map;