Set the 'properties' member to null if the feature has not properties

This commit is contained in:
Frederic Junod
2015-03-12 15:57:11 +01:00
parent da94ee5754
commit 96883e0b69
2 changed files with 8 additions and 0 deletions

View File

@@ -516,6 +516,8 @@ ol.format.GeoJSON.prototype.writeFeatureObject = function(
goog.object.remove(properties, feature.getGeometryName());
if (!goog.object.isEmpty(properties)) {
object['properties'] = properties;
} else {
object['properties'] = null;
}
return object;
};