From f3283e921262db676578d1c1f75bf8f0038c4e3f Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Fri, 1 Aug 2008 01:30:39 +0000 Subject: [PATCH] Adding gml specific attributes to feature in gml parsing. p=sbenthall r=me (closes #1328) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7654 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/GML.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index 66fd8cb35c..c7cfa10c88 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -168,6 +168,13 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { attributes = this.parseAttributes(node); } var feature = new OpenLayers.Feature.Vector(geometry, attributes); + + feature.gml = { + featureType: node.firstChild.nodeName.split(":")[1], + featureNS: node.firstChild.namespaceURI, + featureNSPrefix: node.firstChild.prefix + }; + // assign fid - this can come from a "fid" or "id" attribute var childNode = node.firstChild; var fid;