-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
Implement clustering properties to ShapeSource #1745
Implement clustering properties to ShapeSource #1745
Conversation
a93b1c9
to
37f8c71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks very much, looks great, to me. Can you update with current main?!
37f8c71
to
3229c32
Compare
Thank you! Rebased to latest main. |
Hey, any clue when we can get this merged in? |
@ivari I'm sorry can you rebase again?! Also can you extend a note in README that it was implemented on maplibre/mapbox-gl |
For some reason the URL fetching no longer worked.
We were unable to support the simplified syntax properly on iOS. Changed documentation to only suggest the advanced syntax. We would be happy to see someone add to our PR.
3229c32
to
cd32098
Compare
cd32098
to
dfbea09
Compare
@mfazekas, @naftalibeder, my apologies, was on sick leave for a week. Done as you requested, now. |
Thanks @ivari! |
@ivari amazing thanks for this! Do you mind sharing a basic example of usage. Im unable to get it to work. Here's what I got:
and pointCountStyle:
|
@WoodburyShortridge please see example at From first glance, the problem you are having is that you are using the short-hand I'll be honest here and say that my teams Obj-C skills were not enough to implement the short-hand on iOS. I'd love to see someone take our code and fix that, but until then you can get the exact result you need with just a bit of extra boilerplate. |
thanks @ivari makes sense. I've changed it to use the accumulated def I'm at the latests from Is there something else I am missing here? Really appreciate your help and thanks again for the PR and pointing me to the example app 👍 ! Feature collection:
Shape source:
Point count style:
|
@WoodburyShortridge sorry to disappoint you even further. We use |
@WoodburyShortridge can you add an issue for that?! It's just not yet implemented for v10 mapbox versions yet. Shouldn't be hard to implement. |
is this implemented on the v8 branch? I don't see this clusterProperties prop used in the Earthquake example file. I can't get it to work in my project, and I'm not sure if it's just that I'm terrible with Mapbox expressions. |
@ahardy42 I'm sure it's on |
Description
Years ago, Mapbox implemented
clusterProperties
attribute forShapeSource
, which enables declaring custom aggregated properties for clustered features on the map.Android: mapbox/mapbox-gl-native#15425
iOS: mapbox/mapbox-gl-native#15515
I wanted to see this implemented, as we have a use case in our app where we want to open a new view on cluster tap, which shows information for all features clustered under the icon. Additionally, we want to show information on the icon which is more complex than simple
{point_count}
.So, finally, we got around to implementing it. Here's the PR.
The fork is already running in production for our apps as well.
Relevant feature request: #693
Checklist
yarn lint:fix
in the root folderyarn generate
in the root folderCHANGELOG.md
index.d.ts
)/example
)Screenshot OR Video
See the video from our implementation in our B2B app.
https://user-images.githubusercontent.com/5424427/154564667-1ea37d1e-e9e7-4377-9faf-c5c6090c7530.mov