Pullup changes to trunk for RC2. Includes drag-fires click changes
(Closes #982), comment/documentation/requires changes (Closes #983, #993, #988), Fixing post support in proxy.cgi (Closes #991), baseLayer zoom level change (Closes #990), typo in Layer.Image.setURL (Closes #985), and a fix or the Layer.Google bug caused by Google's changing internals (#994). RC2, here we come. git-svn-id: http://svn.openlayers.org/branches/openlayers/2.5@4390 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -78,13 +78,27 @@
|
||||
|
||||
bounds = new OpenLayers.Bounds(10,10,12,12);
|
||||
zoom = layer.getZoomForExtent(bounds);
|
||||
|
||||
t.eq( zoom, 7, "getZoomForExtent() returns correct value");
|
||||
/**
|
||||
* ideal resolution: 2 map units / 500px = 0.004
|
||||
* layer.resolutions = [0.703125, 0.3515625, 0.17578125,
|
||||
* 0.087890625, 0.0439453125, 0.02197265625,
|
||||
* 0.010986328125, 0.0054931640625, 0.00274658203125,
|
||||
* 0.001373291015625, 0.0006866455078125, 0.00034332275390625,
|
||||
* 0.000171661376953125, 0.0000858306884765625, 0.00004291534423828125,
|
||||
* 0.000021457672119140625]
|
||||
*
|
||||
* So, we expect a zoom of 8 because it is the closest resolution.
|
||||
*/
|
||||
t.eq( zoom, 8, "getZoomForExtent() returns correct value");
|
||||
|
||||
bounds = new OpenLayers.Bounds(10,10,100,100);
|
||||
zoom = layer.getZoomForExtent(bounds);
|
||||
/**
|
||||
* ideal resolution: 90 map units / 500px = 0.18
|
||||
* So, we expect a zoom of 2 because it is the closest.
|
||||
*/
|
||||
|
||||
t.eq( zoom, 1, "getZoomForExtent() returns correct value");
|
||||
t.eq( zoom, 2, "getZoomForExtent() returns correct value");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user