The root element shouldn't be prefixed, this is not XML valid. (checked using xmllint --noout --schema http://www.topografix.com/GPX/1/1/gpx.xsd mygpx.gpx)

This commit is contained in:
Pierre GIRAUD
2012-02-15 11:50:55 +01:00
parent 52931daf32
commit cb65b69556

View File

@@ -218,7 +218,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, {
write: function(features, metadata) {
features = OpenLayers.Util.isArray(features) ?
features : [features];
var gpx = this.createElementNSPlus("gpx:gpx");
var gpx = this.createElementNS(this.namespaces.gpx, "gpx");
gpx.setAttribute("version", "1.1");
this.setAttributes(gpx, {
"xsi:schemaLocation": this.schemaLocation