I've been looking at clustering markers in MapBox GL (https://www.mapbox.com/mapbox-gl-js/example/cluster/), but I was hoping to do it a little differently.
Essentially, I have a geojson file with a count of Incidents per building (point) on our campus in a property. I'd like to display that number in a marker and then as one zooms out, the markers collapse and add the values of that marker together.
The clustering examples I see simply count the points, but don't seem to provide for aggregating properties. Is such a thing doable?
This functionality does not exist in mapbox-gl-js but could and should! Please use the GitHub issue for further discussion and updates. https://github.com/mapbox/mapbox-gl-js/issues/2412
I can't post as a comment due to low reputation, but it looks like the ability to accept a function is unavailable as of now:
https://github.com/mapbox/mapbox-gl-js/issues/2412
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With