Mapbox-gl-js: Tiled GeoJSON source

Created on 16 Feb 2019  路  6Comments  路  Source: mapbox/mapbox-gl-js

Mapbox GL JS does not support loading geojson in xyz mode?

feature

Most helpful comment

We want mapbox-gl to support vector tiles in GeoJSON format

All 6 comments

Do you mean, it doesn't support vector tiles in GeoJSON format? True afaik. (Unlike Tangram, which supported PBF, GeoJSON and TopoJSON. The latter two turn out to be really useful for debugging of various types...)

If this is a feature request, you might want to make that clearer.

We want mapbox-gl to support vector tiles in GeoJSON format

We want mapbox-gl to support loading GeoJson as a data service, just like loading a map tile with tile rank and zoom levels. The data service is defined by us, that is, the GeoJson data in the tile scope is known. We know that mapbox-gl can add and update GeoJson through the methods of addSource and setData. The addSource method requires GeoJson to be complete, but our data service is not like this. It will return data multiple times depending on the position of the tile, which means that every time we get the data is not complete, we need to merge the data and then load, otherwise we will create multiple Source, we have no way to add multiple Sources to A layer. Do you have any good solutions?

Unfortunately we don't support this use case at the moment. The only workaround that comes to mind to me is to create a Service Worker proxy that queries GeoJSON tiles and encodes them as vector tiles with https://github.com/mapbox/vt-pbf.

I have the same issue. Any movement?

@mourner I'd be happy to help if you are interested in having this, let me know!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aendrew picture aendrew  路  3Comments

muesliq picture muesliq  路  3Comments

yoursweater picture yoursweater  路  3Comments

BernhardRode picture BernhardRode  路  3Comments

bgentry picture bgentry  路  3Comments