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

Question - the right way to serve cluster vector tiles to the client #79

Open
y5wang opened this issue Mar 9, 2018 · 2 comments
Open
Labels

Comments

@y5wang
Copy link

y5wang commented Mar 9, 2018

I'm new to mapbox/supercluster and have a question on the best / right way to serve vector tiles with clusters to the client on the server side.

Once I get the clusters as
let index = supercluster({ minZoom: 0, maxZoom: 16, radius: 40, extent: 8192, log: true }).load(points.features)

I can get a tile by
let clusters = index.getTile(tile.z, tile.x, tile.y);

My question is how do I serve it to the client. From online documents, looks I need to convert it to pbf through vt-pbf package, as
vtpbf.fromGeojsonVt({ clusters }, {version: 2})
but the results seem wrong (duplicated clusters on map at the client side, and jumpy points while zooming). Can somebody point me to the right direction? Thanks.

@StuRuby
Copy link

StuRuby commented Apr 1, 2019

Same question

@cosmin-petrescu
Copy link

You need to mention the extent to vtpbf like: vtpbf.fromGeojsonVt({ clusters }, {version: 2, extent: 8192}).

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

No branches or pull requests

4 participants