Ticket #3313 (closed bug: fixed)
GeoJSON strings should not include internal feature ids
|Reported by:||erilem||Owned by:||tschaub|
Currently the GeoJSON format does this when serializing a feature:
"id": feature.fid == null ? feature.id : feature.fid,
So if the feature object has no fid, meaning it is not known outside OpenLayers, then we set id to feature.id in the GeoJSON string.
We should not. OpenLayers internal ids shouldn't be written into the GeoJSON string, as it may confuse the server.
In MapFish we'd indeed like to determine whether the feature is being updated or created, based on whether id is set or not in the GeoJSON string. Currently MapFish considers it is a CREATE operation if the id is a string, which is far from ideal.