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;