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

Feature Request: Add clusterProperties option for aggregated cluster properties #697

Open
martin-kieliszek opened this issue Feb 17, 2019 · 3 comments

Comments

@martin-kieliszek
Copy link

Hi @alex3165

Thanks for all of your great work!

Would be curious to get your opinion on the integration of the following:
mapbox/mapbox-gl-js#7584

Available in mapbox-gl-js v0.53.0

So that things like this are possible
https://bl.ocks.org/ryanbaumann/01b2c7fc0ddb7b27f6a72217bd1461ad

Thus far, I have been having trouble achieving the same result. Would appreciate any comment if you have an idea how the above demo can be acheived right now in your current library.

Kind Regards

@herchu
Copy link

herchu commented Feb 23, 2019

FWIW I am looking for the same feature.

Clusters are already supported in v0.52.0, but the clusterProperties feature (which allows you to compute aggregated fields from points in a cluster) appears in 0.53. I am actually using react-map-gl (not react-mapbox-gl) and doing some testing it appears that v0.53.0 works ok, but ideally I would wait for a release of either react library to upgrade to it.

@FrancisRoc
Copy link

Hi @alex3165,
I really need the clusterProperties option available in mapbox v0.53.0, so if you could take a look to update the version soon, it would be great!

@matsomo
Copy link

matsomo commented Jun 19, 2019

Any updates on this, and if so, do you have to specify the clusterProperties in the sourceOptions?

<GeoJSONLayer
data={props.data}
type="geoJson"
id="cluster_source_layer"
sourceOptions={{
cluster: true,
clusterRadius: 80,
clusterProperties: {
"totalCount": ["get", "totalCount"],
}
}}
/>

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

4 participants