[OpenLayers-Users] parse GML v3 with OpenLayers.Format.GML.v3

Sébastien Geindre sebastien.geindre at meteo.fr
Fri Oct 10 04:03:50 EDT 2008


hello all,

In OL2.7, I try to parse a simple GML v3 feature, but it does not work.


var tma = new OpenLayers.Layer.GML("CDG TMA", "tmaCDG.gml", {format: 
OpenLayers.Format.GML.v3});

the file tmaCDG.gml :

<?xml version="1.0" encoding="URF-8"?>
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml">
	<gml:featureMember>
		<gml:Polygon srsName="EPSG:4326">
			<gml:exterior>
				<gml:LinearRing>
					<gml:posList>49.97 0.67 49.97 3.90 47.66 3.90 47.66 0.67 49.97 
0.67</gml:posList>
				</gml:LinearRing>
			</gml:exterior>
		</gml:Polygon>
	</gml:featureMember>
</gml:FeatureCollection>

The file is well-parsed but features in GML.js line 139 is empty...
this.readNode(elements[i], {features: features});

is there any example of parsing GML v3 ?

thanks





More information about the Users mailing list