FeatureId support in GML (r/w) and KML (w)

Now that we have FeatureId support (see #733), we can add this back to the
GML parsers (v2 and v3). Also add write support for FeatureId in KML, read
support was already added by @fredj
This commit is contained in:
Bart van den Eijnden
2013-05-24 16:45:33 +02:00
parent e63423eafe
commit 3ee533a9b0
9 changed files with 27 additions and 17 deletions
+4
View File
@@ -687,6 +687,10 @@ ol.parser.KML = function(opt_options) {
},
'_feature': function(feature) {
var node = this.createElementNS('Placemark');
var fid = feature.getFeatureId();
if (goog.isDef(fid)) {
node.setAttribute('id', fid);
}
this.writeNode('name', feature, null, node);
this.writeNode('description', feature, null, node);
var literals = feature.getSymbolizerLiterals();