add an optional argument to getAttributes so we can get a feature's attributes except for the geometry ones

This commit is contained in:
Bart van den Eijnden
2013-11-19 15:39:22 +01:00
parent 936f86568e
commit 8d03fa1197
4 changed files with 28 additions and 10 deletions

View File

@@ -422,11 +422,10 @@ ol.parser.ogc.GML = function(opt_options) {
this.writeNode('_geometry', feature.getGeometry(), this.featureNS,
node);
}
var attributes = feature.getAttributes();
var attributes = feature.getAttributes(true);
for (var name in attributes) {
var value = attributes[name];
if (goog.isDefAndNotNull(value) && !(value instanceof
ol.geom.Geometry)) {
if (goog.isDefAndNotNull(value)) {
this.writeNode('_attribute', {name: name, value: value},
this.featureNS, node);
}