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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user