Changing/fixing the meaning of getServerZoom.

If a layer is configured with serverResolutions, then getServerZoom should return the zoom level as index of the current resolution in the serverResolutions array.
This commit is contained in:
ahocevar
2012-04-26 10:55:03 -04:00
committed by Tim Schaub
parent a57c56ed96
commit 9585341d9c
5 changed files with 9 additions and 14 deletions
+2 -2
View File
@@ -837,12 +837,12 @@
layer.serverResolutions = [2, 1];
resolution = 1;
zoom = layer.getServerZoom();
t.eq(zoom, 3, '[3] getServerZoom return value is correct');
t.eq(zoom, 1, '[3] getServerZoom return value is correct');
layer.serverResolutions = [2];
resolution = 0.5;
zoom = layer.getServerZoom();
t.eq(zoom, 2, '[4] getServerZoom return value is correct');
t.eq(zoom, 0, '[4] getServerZoom return value is correct');
var exc;
layer.serverResolutions = [0.5];