Note about mysterious "dimension" attribute.

This commit is contained in:
ahocevar
2012-06-14 15:26:13 +02:00
parent 88982e043f
commit 6052d19c2f

View File

@@ -144,8 +144,10 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, {
this.regExes.trimSpace, ""
);
var coords = str.split(this.regExes.splitSpace);
// The "dimension" attribute is not part of the spec, it is
// only used in an example (OGC 03-105r1, page 235).
var dim = obj.srsDimension ||
parseInt(node.getAttribute("dimension") || node.getAttribute("srsDimension"), 10) || 2;
parseInt(node.getAttribute("srsDimension") || node.getAttribute("dimension"), 10) || 2;
var j, x, y, z;
var numPoints = coords.length / dim;
var points = new Array(numPoints);