[OpenLayers-Commits] r2021 - sandbox/vector/lib/OpenLayers/Writer
commits at openlayers.org
commits at openlayers.org
Thu Dec 7 04:12:08 EST 2006
Author: pgiraud
Date: 2006-12-07 04:12:03 -0500 (Thu, 07 Dec 2006)
New Revision: 2021
Modified:
sandbox/vector/lib/OpenLayers/Writer/GML.js
Log:
#439 debug
one comma too many at the end of object declaration
and lack of CLASS_NAME member
Modified: sandbox/vector/lib/OpenLayers/Writer/GML.js
===================================================================
--- sandbox/vector/lib/OpenLayers/Writer/GML.js 2006-12-07 03:47:42 UTC (rev 2020)
+++ sandbox/vector/lib/OpenLayers/Writer/GML.js 2006-12-07 09:12:03 UTC (rev 2021)
@@ -37,7 +37,12 @@
coordinates.setAttribute("cs", ",");
coordinates.setAttribute("ts", " ");
- var points = geometry.components[0].path;
+ if (geometry.components) {
+ var points = geometry.components[0].path;
+
+ } else {
+ var points = geometry.path;
+ }
var path = "";
for (var i = 0; i < points.length; i++) {
path += points[i].lon + "," + points[i].lat + " ";
@@ -51,4 +56,6 @@
this.gml.appendChild(lineStringMember);
},
+
+ CLASS_NAME: "OpenLayers.Writer.GML"
}
\ No newline at end of file
More information about the Commits
mailing list