Clear bounds of geometries when reprojecting. Patch wwork by myself, tschaub,

ahocevar. r=ahocevar. (Closes #1658)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7885 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-08-28 18:41:00 +00:00
parent 1b71180f14
commit 2d286b7ccc
6 changed files with 57 additions and 1 deletions

View File

@@ -37,6 +37,20 @@
t.eq( point.bounds.bottom, y, "bounds.bottom is 20" );
}
function test_Point_transform_getBounds (t) {
t.plan(2);
var x = 10;
var y = 20;
point = new OpenLayers.Geometry.Point(x, y);
point.calculateBounds();
t.ok( point.bounds != null, "bounds calculated by calcBounds" );
point.transform(new OpenLayers.Projection("EPSG:4326"),
new OpenLayers.Projection("EPSG:900913"));
t.eq(point.bounds, null, "Point bounds cleared after transform");
}
function test_Point_distanceTo(t) {
t.plan(2);