[OpenLayers-Users] getting features from GML.v3().read()

Huub Fleuren huub.gis at gmail.com
Wed Nov 12 07:29:31 PST 2014


Hi List,

I was trying to read the following GML text with the Format.GML.v3

<?xml version="1.0" encoding="UTF-8"?>
<gml:MultiGeometry xmlns:gml="http://www.opengis.net/gml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sch="http://www.ascc.net/xml/schematron" srsDimension="2">
<gml:geometryMember>
<gml:Polygon srsDimension="2">
<gml:exterior>
<gml:LinearRing srsDimension="2">
<gml:posList>115.0 15.5 118.0 16.0 118.0 18.0 113.0 17.166666666666668
112.0 18.0 114.5 20.0 120.0 20.0 120.0 10.0 116.2 10.0 118.0 13.0 115.0 15.5
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
<gml:geometryMember>
<gml:Polygon srsDimension="2"><gml:exterior><gml:LinearRing
srsDimension="2">
<gml:posList>115.0 15.5 118.0 13.0 116.2 10.0 110.0 10.0 110.0 20.0 114.5
20.0 112.0 18.0 113.0 17.166666666666668 112.0 17.0 112.0 15.0 115.0 15.5
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</gml:geometryMember>
</gml:MultiGeometry>

code:
var gml = new OpenLayers.Format.GML.v3(); var features = gml.read(GMLtext);


Apparently this is parsed correctly by Format.XML, but i never get a list
of features from the read () function.

Is it possible? How?

Regards, Huub
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20141112/04d0da76/attachment.html>


More information about the Users mailing list