zoomFactor defaults to 2

This commit is contained in:
Éric Lemoine
2013-02-20 16:47:22 +01:00
parent 3803275a1e
commit 57a86353cd
4 changed files with 5 additions and 21 deletions
+2 -4
View File
@@ -359,10 +359,8 @@ ol.View2D.createConstraints_ = function(view2DOptions) {
maxResolution = Math.max(
projectionExtent.maxX - projectionExtent.minX,
projectionExtent.maxY - projectionExtent.minY) / ol.DEFAULT_TILE_SIZE;
// number of steps we want between two data resolutions
var numSteps = 4;
numZoomLevels = 29 * numSteps;
zoomFactor = Math.exp(Math.log(2) / numSteps);
numZoomLevels = 29;
zoomFactor = 2;
}
resolutionConstraint = ol.ResolutionConstraint.createSnapToPower(
zoomFactor, maxResolution, numZoomLevels - 1);