Hi folks,
I'm trying to parse a GML response from a getfeatureinfo request made to
geoserver but I can't retrieve the features from it.
var theParser = new OpenLayers.Format.GML();
theParser.internalProjection = null;
theParser.externalProjection = null;
theParser.extractStyles = false;
theParser.extractAttributes = true;
var features = theParser.read(req.responseText);
features.length is 0
XML attached to email.
I've also tried the solution provided in
http://www.mail-archive.com/[email protected]/msg16330.html
Am I doing something wrong??
Thanks.
Un saludo,
··················································································
David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)
··················································································
Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
··················································································
email: [email protected] web: www.ikt.es
··················································································
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:Prueba="http://www.prueba.test.com" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.prueba.test.com http://192.168.1.38:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=Prueba%3ARecintosSigpac http://www.opengis.net/wfs http://192.168.1.38:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#23030"><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">526146.67965884,4763952.08252353 527257.61308961,4764799.78744235</gml:coordinates></gml:Box></gml:boundedBy><gml:featureMember><Prueba:RecintosSigpac fid="RecintosSigpac.885017"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#23030"><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">526146.67965884,4763952.08252353 527257.61308961,4764799.78744235</gml:coordinates></gml:Box></gml:boundedBy><Prueba:PROVINCIA>48</Prueba:PROVINCIA><Prueba:MUNICIPIO>72</Prueba:MUNICIPIO><Prueba:POLIGONO>2</Prueba:POLIGONO><Prueba:PARCELA>7</Prueba:PARCELA><Prueba:RECINTO>2</Prueba:RECINTO><Prueba:DN_SURFACE>457854.44664</Prueba:DN_SURFACE><Prueba:DN_PERIMET>3346.35674</Prueba:DN_PERIMET><Prueba:PENDIENTE>36</Prueba:PENDIENTE><Prueba:ELEGIBILIDAD>0</Prueba:ELEGIBILIDAD><Prueba:COEF_PASTO>0</Prueba:COEF_PASTO><Prueba:USO_SIGPAC>11</Prueba:USO_SIGPAC><Prueba:USO_2003>11</Prueba:USO_2003><Prueba:DN_OID>719874732</Prueba:DN_OID><Prueba:FECHA>2010-01-01</Prueba:FECHA><Prueba:GEOMETRY><gml:GeometryCollection srsName="http://www.opengis.net/gml/srs/epsg.xml#23030"><gml:geometryMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">526476.08854755,4764794.26780128 526459.18021408,4764799.78744235 526421.25267752,4764770.21680418 526394.11730701,4764753.94325399 526385.38082316,4764747.57049003 526340.96955213,4764715.17345195 526318.7597117,4764700.0268817 526293.06933708,4764680.76197788 526260.5324729,4764657.20761333 526218.57068808,4764626.81279692 526177.70776287,4764596.46899007 526146.67965884,4764574.59647154 526163.91931491,4764548.58943356 526177.67139061,4764525.67811214 526184.1970844,4764513.88136242 526204.44009368,4764511.4735269 526225.91860952,4764471.79946869 526240.14182966,4764447.2145588 526250.48697781,4764427.79959946 526259.22053859,4764404.83195135 526270.7809056,4764378.42173725 526281.12684902,4764360.62649729 526290.49691891,4764344.44719181 526305.36934225,4764319.87422199 526318.27096164,4764299.92930741 526332.16714047,4764271.7781975 526344.13260366,4764244.93217124 526359.61741902,4764206.86443472 526397.75266023,4764133.94020339 526411.97787035,4764107.41019624 526434.24217039,4764070.02970784 526446.85119568,4764057.09316324 526459.46030454,4764044.14733363 526492.71869303,4764008.94119827 526493.37739841,4764008.14322308 526494.01772323,4764008.56458271 526617.95286152,4763969.08451561 526638.79695757,4763963.59919682 526690.7929218,4763952.08252353 526796.24290563,4764073.03910575 526815.9704331,4764099.73856376 526840.69338716,4764134.26746656 526864.33337165,4764159.3069005 526902.35252078,4764197.22999391 526942.62257069,4764233.99861292 526990.57876535,4764276.70866353 527037.41195373,4764320.0382859 527079.18682431,4764357.54904408 527096.86759934,4764374.65353006 527125.86113275,4764411.38790416 527172.95675755,4764470.72075672 527188.16663074,4764490.84091966 527210.74697746,4764510.39469264 527221.87957888,4764520.28733635 527230.19859983,4764528.48396644 527257.61308961,4764553.27918901 527242.35234076,4764566.59464831 527238.06948472,4764570.32890118 527233.1931863,4764563.60739446 527220.16937214,4764546.78171141 527207.53667125,4764531.18632632 527190.622166,4764507.01947084 527184.96994642,4764509.93847765 527174.47825035,4764515.75180858 527163.24072687,4764521.94384046 527151.44865757,4764528.4967193 527141.89716328,4764534.87233945 527129.04203653,4764544.3159688 527122.60121643,4764548.07896879 527115.80723287,4764553.07859962 527107.47193762,4764559.30084514 527100.85954753,4764565.00865314 527093.14868305,4764572.20146962 527086.66786803,4764577.453698 527080.96667175,4764582.42045689 527078.61808033,4764585.74358661 527076.38318309,4764589.67221693 527074.18314414,4764595.14618992 527072.91913456,4764598.77148532 527071.66690468,4764602.87155892 527070.75322087,4764605.97696764 527070.00701173,4764609.90218357 527069.62921741,4764613.91263372 527069.99929274,4764618.7544964 527070.89282606,4764625.91623687 527072.13748976,4764632.35330755 527072.31112985,4764638.51619411 527073.37759579,4764646.84217692 527073.53731856,4764647.89466492 527069.75979715,4764649.93688324 527065.39840848,4764651.12041508 527062.21723061,4764649.14374331 527059.44214133,4764646.35884368 527052.69630838,4764639.22049792 527049.1221355,4764631.28486499 527045.55371304,4764620.16576432 527041.18312803,4764609.8533303 527035.6291598,4764603.50162465 527030.86888495,4764596.75279651 527025.31378025,4764587.22691124 527021.34560763,4764580.48121975 527019.75441568,4764575.31804901 527019.36090092,4764572.94283812 527017.37048107,4764568.57861829 527016.57935816,4764566.59279229 527014.19557391,4764565.0009398 527010.62881112,4764563.81398874 527005.86232544,4764563.81378515 526999.51471126,4764563.01612484 526997.92517387,4764562.61889559 526992.37335344,4764562.6249102 526984.03697723,4764562.22898862 526972.92074172,4764560.2396772 526961.80817317,4764559.05092556 526955.06290926,4764558.65200277 526948.71328279,4764561.82909232 526943.15638343,4764566.59174768 526940.37879427,4764571.35604509 526939.18920684,4764576.90850795 526939.1882269,4764578.89120517 526938.79230475,4764584.05583885 526937.20392596,4764586.8328117 526934.82027339,4764590.40718045 526931.2527149,4764596.35985327 526930.06100129,4764600.7208271 526930.45724465,4764605.87927182 526932.04849642,4764611.04242176 526935.21719318,4764616.20247531 526939.98479755,4764619.37681801 526948.31444652,4764624.92954492 526951.49563152,4764626.91547176 526955.46427419,4764630.08667734 526961.01402997,4764634.05533616 526967.36643427,4764638.8183829 526975.712815,4764643.57999085 526973.21230372,4764645.61799024 526968.02239972,4764650.83818727 526963.62777442,4764655.26099591 526931.79891833,4764638.00803719 526910.08271022,4764624.36014506 526890.81117264,4764610.69400807 526880.63287703,4764604.63143 526862.12861425,4764593.78885244 526842.21079027,4764589.89419403 526824.17236515,4764592.57873282 526802.68606786,4764593.36019149 526802.37874258,4764593.3682957 526786.5532124,4764562.83042404 526780.19288636,4764560.0409086 526764.02912338,4764567.03345175 526751.17021955,4764568.86345702 526733.53152441,4764568.85965524 526713.69068584,4764571.44435663 526686.66782713,4764584.06352859 526683.78083558,4764585.41129968 526665.40945389,4764596.44464002 526648.51103303,4764611.52363643 526642.34164677,4764619.31870391 526627.55990474,4764637.98975117 526617.21047632,4764651.28848253 526605.52278263,4764666.31339616 526555.34082326,4764718.58082629 526528.36761922,4764732.70878153 526507.84828618,4764748.4070552 526503.24942092,4764752.76420658 526502.1731297,4764753.84912518 526484.21924,4764771.88452359 526479.04955144,4764786.11575006 526476.08854755,4764794.26780128</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:geometryMember></gml:GeometryCollection></Prueba:GEOMETRY></Prueba:RecintosSigpac></gml:featureMember></wfs:FeatureCollection>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users