Adding fractionalZoom property to the map. This allows zooming to an arbitrary level, making it possible to have non-discrete resolutions for layers that support it. This property should not be set to true for layers with fixed zoom levels (commercial layers or others with cached tiles). r=elemoine,crschmidt,ahocevar (closes #1243)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5982 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2008-02-04 06:23:54 +00:00
parent 1faf641806
commit 211a2834de
6 changed files with 225 additions and 20 deletions

View File

@@ -958,6 +958,22 @@
se.toString(),
"map extent not restricted with null restrictedExtent for se");
}
function test_Map_getResolutionForZoom(t) {
t.plan(2);
var map = new OpenLayers.Map("map");
var res = map.getResolutionForZoom();
t.eq(res, null, "getResolutionForZoom returns null for no base layer");
map.fractionalZoom = true;
var layer = new OpenLayers.Layer("test", {isBaseLayer: true});
layer.getResolutionForZoom = function() {
t.ok(true, "getResolutionForZoom calls base layer getResolutionForZoom");
}
map.addLayer(layer);
var res = map.getResolutionForZoom();
layer.destroy();
map.destroy();
}
function test_99_Map_destroy (t) {
t.plan( 3 );