Should MapLibre support the GeoJSON spec fully? #3134
Replies: 1 comment 1 reply
-
I've written this is the past but I can't find it now for some reason... :-( We are looking into creating a new format that will power maplibre better, but it will take years I believe. See this too: mapbox/vector-tile-spec#94 (version 3 was never released so the merged PR is not "helpful". |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently MapLibre effectively strips GeoJSON string feature ids (#1043), which are perfectly legal according to the spec:
"If a Feature has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id", and the value of this member is either a JSON string or number." [1]
It is straightforward to put the id in the properties of course, but the user needs to guarantee there will be no clash with other properties. We don't always have control over the properties - for example if I'd chosen "fid" there are 300k opportunities to overwrite an OSM tag [2]
This really feels like the library is imposing constraints on the data model.
[1] https://datatracker.ietf.org/doc/html/rfc7946#section-3.2
[2]https://taginfo.openstreetmap.org/keys/fid#overview
Beta Was this translation helpful? Give feedback.
All reactions