From cb65b69556737cf5c3ca3c9f8931460630b69764 Mon Sep 17 00:00:00 2001 From: Pierre GIRAUD Date: Wed, 15 Feb 2012 11:50:55 +0100 Subject: [PATCH] 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) --- lib/OpenLayers/Format/GPX.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Format/GPX.js b/lib/OpenLayers/Format/GPX.js index f3f0fce313..a5b5e772e8 100644 --- a/lib/OpenLayers/Format/GPX.js +++ b/lib/OpenLayers/Format/GPX.js @@ -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