diff --git a/tests/Format/GML/v2.html b/tests/Format/GML/v2.html index 730e7eaf41..3a123354d6 100644 --- a/tests/Format/GML/v2.html +++ b/tests/Format/GML/v2.html @@ -176,6 +176,25 @@ t.eq(attributes["STATE_ABBR"], "IL", "read STATE_ABBR"); t.eq(attributes["LAND_KM"], "143986.61", "read LAND_KM"); } + + function test_boundedBy(t) { + t.plan(5); + + var doc = readXML("v2/boundedBy.xml"); + var format = new OpenLayers.Format.GML.v2({ + featureType: "states", + featureNS: "http://www.openplans.org/topp", + geometryName: "the_geom", + xy: false + }); + var features = format.read(doc.documentElement); + var geom = features[0].geometry; + t.ok(geom.bounds instanceof OpenLayers.Bounds, "geometry given a bounds"); + t.eq(geom.bounds.left.toFixed(2), "-91.52", "bounds left correct"); + t.eq(geom.bounds.bottom.toFixed(2), "36.99", "bounds bottom correct"); + t.eq(geom.bounds.right.toFixed(2), "-87.51", "bounds right correct"); + t.eq(geom.bounds.top.toFixed(2), "42.51", "bounds top correct"); + } function test_write(t) { t.plan(1); @@ -601,5 +620,8 @@
+