Fix write out GeoJSON features with id equal to 0

This commit is contained in:
Frederic Junod
2015-10-28 15:09:29 +01:00
parent 4846a49258
commit d59f6979f7
2 changed files with 7 additions and 1 deletions

View File

@@ -530,7 +530,7 @@ ol.format.GeoJSON.prototype.writeFeatureObject = function(
'type': 'Feature'
};
var id = feature.getId();
if (id) {
if (id !== undefined) {
object['id'] = id;
}
var geometry = feature.getGeometry();