[OpenLayers-Commits] r12315 -
sandbox/camptocamp/clientzoom/tests/Layer
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Sep 1 10:47:54 EDT 2011
Author: erilem
Date: 2011-09-01 07:47:53 -0700 (Thu, 01 Sep 2011)
New Revision: 12315
Modified:
sandbox/camptocamp/clientzoom/tests/Layer/Grid.html
Log:
add test for Grid.getResolutionScale
Modified: sandbox/camptocamp/clientzoom/tests/Layer/Grid.html
===================================================================
--- sandbox/camptocamp/clientzoom/tests/Layer/Grid.html 2011-09-01 14:47:43 UTC (rev 12314)
+++ sandbox/camptocamp/clientzoom/tests/Layer/Grid.html 2011-09-01 14:47:53 UTC (rev 12315)
@@ -740,6 +740,21 @@
map.destroy();
}
+ function test_getResolutionScale(t) {
+ t.plan(1);
+
+ var map = new OpenLayers.Map('map');
+ var layer = new OpenLayers.Layer.WMS('', '', {}, {
+ isBaseLayer: true
+ });
+ map.addLayer(layer);
+ map.zoomToMaxExtent();
+
+ layer.transformDiv(2);
+ var scale = layer.getResolutionScale();
+ t.eq(scale, 2, 'getResolutionScale returns correct value');
+ }
+
</script>
</head>
<body>
More information about the Commits
mailing list