Merge pull request #473 from elemoine/value-resolution

Exponential scaling to ZoomSlider
This commit is contained in:
Éric Lemoine
2013-04-08 05:22:38 -07:00
5 changed files with 128 additions and 132 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;