Ticket #2762 (new bug)
Opened 3 years ago
OpenLayers.Format.GML doesn't understand the srsDimension attribute on a gml:posList element
|Reported by:||msharman||Owned by:||tschaub|
I've been experiencing a problem loading a GML polygon into a layer.
After tracing through the code I believe that the OpenLayers.Format.GML.js is looking for the wrong attribute when passed a gml:posList element.
The relevant GML 3.1.1 code like: <gml:posList srsDimension=”2”> ... </gml:posList>
But the function linestring seems to be expecting something like: <gml:posList dimension=”2” ... </gml:posList>
I made a small change to make this “srsDimension” instead of “dimension” and the polygon is now displayed correctly.
Now I’m a new to GML but according to http://schemas.opengis.net/gml/3.1.1/base/geometryBasic0d1d.xsd: The element “gml:posList” uses the type “gml:DirectPositionListType” that is based on “gml:doubleList” and uses the attribute group “gml:SRSReferenceGroup” which is defined to have the “srsDimension” attribute.
So it looks like the comment is incorrect in OpenLayers/Format/GML.js and the correct attribute is “srsDimension”.
I've attached the complete example GML.