add parsing of boundedBy in Format.WMSGetFeatureInfo, r=elemoine (closes #2329)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9800 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
bartvde
2009-11-16 10:44:02 +00:00
parent ebc5d7c021
commit 10920f6f93
3 changed files with 60 additions and 9 deletions
+9 -2
View File
@@ -52,7 +52,7 @@
}
function test_read_msGMLOutput(t) {
t.plan(7);
t.plan(12);
var parser = new OpenLayers.Format.WMSGetFeatureInfo();
@@ -96,6 +96,7 @@
'</msGMLOutput>';
features = parser.read(text);
t.eq(features.length, 1,
"Parsed 1 feature in total");
@@ -105,6 +106,13 @@
t.eq(features[0].type, 'AAA64',
"Parsed the layer name correctly");
var bounds = features[0].bounds;
t.ok(bounds instanceof OpenLayers.Bounds, "feature given a bounds");
t.eq(bounds.left.toFixed(3), "107397.266", "Bounds left parsed correctly");
t.eq(bounds.right.toFixed(3), "116568.188", "Bounds right parsed correctly");
t.eq(bounds.bottom.toFixed(3), "460681.063", "Bounds bottom parsed correctly");
t.eq(bounds.top.toFixed(3), "480609.250", "Bounds top parsed correctly");
// read 2 features from 2 layers
text =
'<?xml version="1.0" encoding="ISO-8859-1"?>' +
@@ -263,7 +271,6 @@
}
</script>
</head>
<body>