Ticket #3313 (closed bug: fixed)

Opened 2 years ago

Last modified 22 months ago

GeoJSON strings should not include internal feature ids

Reported by: erilem Owned by: tschaub
Priority: minor Milestone: 2.11 Release
Component: Format.GeoJSON Version: 2.11 RC1
Keywords: Cc:
State:

Description

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.

Attachments

patch-3313-A0.diff Download (11.0 KB) - added by erilem 2 years ago.

Change History

Changed 2 years ago by erilem

Changed 2 years ago by erilem

  • state set to Review

Changed 2 years ago by bbinet

  • state changed from Review to Commit

This looks good to me.

Changed 2 years ago by erilem

  • status changed from new to closed
  • resolution set to fixed

(In [12109]) GeoJSON strings should not include internal feature ids, r=bbinet (closes #3313)

Changed 22 months ago by tschaub

  • state Commit deleted
  • version changed from 2.10 to 2.11 RC1
  • milestone changed from 2.12 Release to 2.11 Release
Note: See TracTickets for help on using tickets.