Merge pull request #4332 from fredj/geojson_id_0_write
Fix write out GeoJSON features with id equal to 0
This commit is contained in:
commit
6d9dd030a1
2 files changed
+7
-1
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user