mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Add support for ndgeojson / GeoJSONSeq / GeoJSON Text Sequences

Open andrewharvey opened this issue 6 years ago • 1 comments

Motivation

I'm thinking if we should support sequential GeoJSON https://gdal.org/drivers/vector/geojsonseq.html, new line delimited GeoJSON https://stevage.github.io/ndgeojson/ and GeoJSON Text Sequences https://tools.ietf.org/html/rfc8142 out of the box, transparently with the geojson source.

Design Alternatives

Don't support this out of the box and instead rely on a custom source api #2920 and plugin to implement.

Design

I'm proposing to support sequential geojson transparently though auto-detection so no API changes are needed.

andrewharvey avatar Dec 24 '19 01:12 andrewharvey

I’ve written a guide showing how it can be done, but it’s definitely a lot more complicated for the user than supporting it as a data source like regular GeoJSON.

https://apisyouwonthate.com/blog/stream-geojson-rest-api/

Feel free to use any of this code, it’s pretty rudimentary and I’m sure you’ll do better.

philsturgeon avatar Oct 14 '25 07:10 philsturgeon