Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does cluster support vector tiles? #5856

Closed
Roxyi opened this issue Dec 13, 2017 · 11 comments
Closed

Does cluster support vector tiles? #5856

Roxyi opened this issue Dec 13, 2017 · 11 comments

Comments

@Roxyi
Copy link

Roxyi commented Dec 13, 2017

Hi,

I found this example about cluster: Create and style clusters

I tried to add vector tiles source but it did not work. I wonder if the cluster supports vector tiles or if I wanna cluster points data from vector tiles, is there a way to do so?

Thanks

@jfirebaugh
Copy link
Contributor

No, clustering requires special processing that is only possibly with GeoJSON sources at this time.

@Captain-Oski
Copy link

Captain-Oski commented Mar 1, 2018

Any plan to push this special processing at work ? Thanks

@matthieugayon
Copy link

what about that ? https://github.com/mapbox/vt2geojson

@waissbluth
Copy link

waissbluth commented Feb 21, 2019

Are there any plans to implement this? Even if the clustering math is limited on a per-tile basis

cc @mourner

@asmith13194
Copy link

Two years, any updates on this feature or are we still limited to used geoJson sources at this time

@csimpi
Copy link

csimpi commented Jan 14, 2020

nooo I'm bummed, just refactored the whole site using mapbox tiles instead of loading our big GeoJSON on client level all the time.... clustering should work with vector-tiles too

@rayer10
Copy link

rayer10 commented Oct 31, 2020

"You can cluster data to put into a vector tile source using Tippecanoe, but can not create a cluster from a vector tile source on the fly without some custom code." We ended up using Tippecanoe to add clusters to vector tiles.

Great thanks to @ ryanbaumann

Link: mapbox/mapboxgl-jupyter#71 (comment)

@chinthakaherath
Copy link

Any updates on this feature or are we still limited to using geoJson sources?

@gcontrerasj
Copy link

Hello, have been any update on this feature? Thanks

@AndreyPhilippov
Copy link

Hello! Any updates?

@thejasonxie
Copy link

thejasonxie commented Jun 7, 2024

If you have the raw data in your postgis database, you can cluster it in real time.

Refer to this clustering method in postgis with the following the distances in meters per zoom for the cluster radius. Then just return that data in tiles.

Because clustering can be very expensive at lower zoom levels, you can just return pre-compute at lower zoom level and return real time at higher zoom level.

By using this method, you can also bypass the "clustering math is limited on a per-tile basis" waissbluth mentioned above

The "special processing that is only possibly with GeoJSON sources" is probably the greedy clustering algo implemented on mapbox clusters. You can just precompute by creating a matview around your clustered data and then return that as tiles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests