OpenLayers OpenLayers

Ticket #1328: feature.gml.patch

File feature.gml.patch, 0.7 kB (added by tschaub, 4 months ago)

store gml specific attributes

  • lib/OpenLayers/Format/GML.js

    old new  
    168168            attributes = this.parseAttributes(node); 
    169169        } 
    170170        var feature = new OpenLayers.Feature.Vector(geometry, attributes); 
     171         
     172        feature.gml = { 
     173            featureType: node.firstChild.nodeName.split(":")[1], 
     174            featureNS: node.firstChild.namespaceURI, 
     175            featureNSPrefix: node.firstChild.prefix 
     176        }; 
     177                 
    171178        // assign fid - this can come from a "fid" or "id" attribute 
    172179        var childNode = node.firstChild; 
    173180        var fid;