From 5f89ce40ea4ebaca35a747e0bbc06de2af5b2744 Mon Sep 17 00:00:00 2001 From: bartvde Date: Thu, 10 Feb 2011 10:08:15 +0000 Subject: [PATCH] add a testcase showing that we can now parse the boundedBy tag of a Feature Collection using output: 'object' non-functional change git-svn-id: http://svn.openlayers.org/trunk/openlayers@11074 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tests/Format/WFST/v1_1_0.html | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/tests/Format/WFST/v1_1_0.html b/tests/Format/WFST/v1_1_0.html index c70805fac4..b66ede1120 100644 --- a/tests/Format/WFST/v1_1_0.html +++ b/tests/Format/WFST/v1_1_0.html @@ -34,6 +34,21 @@ t.eq(result.numberOfFeatures, 625, "numberOfFeatures of FeatureCollection correctly read"); } + function test_read_boundedBy(t) { + t.plan(4); + var data = readXML("boundedBy"); + var format = new OpenLayers.Format.WFST.v1_1_0({ + featureNS: "http://mapserver.gis.umn.edu/mapserver", + featureType: "AAA212" + }); + var result = format.read(data, {output: "object"}); + var bounds = result.bounds; + t.eq(bounds.left.toFixed(3), '3197.880', "Left bounds of the feature collection correctly parsed"); + t.eq(bounds.bottom.toFixed(3), '306457.313', "Bottom bounds of the feature collection correctly parsed"); + t.eq(bounds.right.toFixed(3), '280339.156', "Right bounds of the feature collection correctly parsed"); + t.eq(bounds.top.toFixed(3), '613850.438', "Top bounds of the feature collection corectly parsed"); + } + function test_write(t) { var format = new OpenLayers.Format.WFST.v1_1_0({ @@ -135,5 +150,55 @@ --> +