-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Point annotation clustering #5814
Comments
Hi, |
This work is currently blocked by mapbox/supercluster#19. |
Hello Any updates on this? |
Thanks for your interest folks. If there is nothing posted here or in the ticket linked above, you can assume there are no updates. We will post when there is. |
If the performance and memory considerations in mapbox/supercluster#19 (comment) would require a painful tradeoff for the usual case of a static point layer, I wonder if it might be possible to stick to the KDBush algorithm: we could “dirty” the clustering index on each annotation addition, modification, or removal and lazily rebuild the index when the zoom level changes. |
Any workaround, except GeoJSON, I could apply to have clustering in Android application with MapBox SDK? |
First we had to completely rebuild our maps from image to vector (mapbox studio), then we had to wait for customized marker icons, now we have to wait for marker clustering. It was all possible with the old mapbox sdks and an important factor why we switched to mapbox. So is there any chance, that we might see clustering again in ios/js/android in the next months? |
+1 in same boat. Crucial features for my application if I'm going to switch On Oct 21, 2016 9:44 AM, "ttoni" notifications@github.com wrote:
|
Hi, |
You can do point clustering already using the latest SDK betas and runtime styling. Checkout this example in the Android demo app (the same can be done on iOS). |
Thanks, that looks like good news :) Stupid follow up question: You are using a GeoJsonSource in this example. Are you implying that the proper way of creating clusterable annotations is through GeoJson, and that we have to format the markers we want clustered as a geojsonstring to be fed as geojsonsource to the mapboxmap ? is it how it is intended to work ? Thanks for your help ! |
This is currently the only way to cluster icons at this point. This ticket is specifically for exposing clustering through GL markers which we are looking to add in the future. Feel free to reach out through our contact page if you have any additional questions. |
Batching will certainly help. But not only on zoom level changes — when you add an annotation, you want it to be reflected in the current view immediately without changing the zoom. |
Much of the OP is irrelevant now given runtime styling and shape sources, but the interaction point is quite relevant still for in-GL layers vs. the annotations API. |
The original post was written entirely with runtime styling and shape sources in mind. 😉
Implemented for runtime styling in #6436.
This is still a dealbreaker for many use cases that involve data generated piecemeal at runtime: #6177.
#6515 and #4392 would mitigate the issue somewhat, but the fundamental issue is that the runtime styling API isn’t as object oriented as the annotation/overlay API. |
Can anyone comment on whether they have tried using an external (separate) clustering algorithm to determine the set of annotations rendered on MapBox-native? On the surface, it doesn't sound too hard; I use an open-source solution right now with MapKit that is pretty good. Adapting it to MapBox would be a matter of marrying MapBox's annotation APIs with the controllers in that solution. |
+1 |
+10 |
So, is there a way to create clusters with markers created in the mapbox itself? I really need to have that into my University's app. |
Yes, but you’ll need to use the runtime styling API instead of annotations, specifically MGLPointFeature, MGLShapeSource and MGLCircleStyleLayer. Here’s a rather involved example that relies on a bundled file, but hopefully you can adapt it to your needs. |
@1ec5 Sorry, I forgot to mention that I am using Android only, not iOS! |
@1ec5 I spent a lot of time trying to make it work with my markers but I did not manage to make it work with the markers I got. Is there any way, like other APIs, that I could use that could organize my markers when I zoom out? I have 191 markers close to each other, if the user zooms out, it gets really messy! |
Asking the same question here half a year later. |
Me too! Also would like to use the same/similar map component for android
and web but we NEED clustering!
…On Thu, May 4, 2017 at 1:40 PM Anton Averin ***@***.***> wrote:
Asking the same question hear half a year later.
Any progress on clusterring support without GeoJSON? This time I am about
to start making iOS app and was hoping to use MapBox for maps.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5814 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAw2iRe4nR0UqDzjqShlgcwfT9ziblBUks5r2g12gaJpZM4JW21O>
.
|
+1 on vector clustering! |
+1 Vector clustering iOS, Android, Web with annotationViews (fully customizable icons)
… Am 04.05.2017 um 20:30 schrieb nitrag ***@***.***>:
+1 on vector clustering!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
+1.0 |
+1 |
1 similar comment
+1 |
Adding here that until the core implementation for this has landed. You can workaround this on Android using the following plugin. Note this is still a WIP, no release out on maven. |
+1 |
Thanks for everyone’s interest, but GitHub issues are not a voting platform and “+1” is not a useful contribution — if you wish to follow the progress of this issue, hit the “Subscribe” button and you’ll be notified when something actually happens. |
@friedbunny I believe there a a lot of people interested in clustering support. Could you please suggest an alternative way for us to express our interest or "vote" for new features? |
@o15a3d4l11s2 Allow me to humbly suggest GitHub’s emoji “reactions”, which are a positive and unobtrusive way to express interest without cluttering an issue or notifying all of its participants. |
Hi, can you please tell me how can I cluster the points with different pictures (icons)? (ios) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Keeping this open since it's a highly requested feature and we still intend to address this at some point. |
Is there any news on this? It would be highly beneficial to be able to cluster annotations without resorting to geojson. |
After 2.5 years since this issue was raised. Any progress/alternatives? |
Wow, 2.5 years indeed. I've completely forgotten that this still existed. @aquabay Anyway, I moved away from Mapbox long ago and I found an easy way to do clustering using the good-old Google Maps:
Good luck! |
That's fine if your app is making a bucket load of profit or has minimal traffic (no pun intended). Google Maps now have their hand well and truly in your pocket. I'm not sure their pricing schedule has anything to do with luck ;) |
The longstanding “GL point annotation” API (exposed as MGLPointAnnotation on iOS and macOS,
Marker
on Android, andPointAnnotation
on Qt) should support options for marker clustering. The GeoJSON point clustering implemented in #5724 is important for parity with Mapbox GL JS, but its use will be somewhat limited until this functionality is extended to point annotations, which have a few important advantages over GeoJSON points:Marker
have built-in support for interactivity, opening a popup when tapped. GeoJSON points require the developer to handle gesture recognition, selection, and spatial querying with custom code.Based on its unique behaviors,
mbgl::SymbolAnnotation
could not be reimplemented using GeoJSON layers. However, as long as Supercluster is extended to support dynamically changing markers,SymbolAnnotation
could use Supercluster much the way GeoJSON layers do now.We’ll need to add public APIs to the SDKs for configuring marker clustering.
/cc @mourner @jfirebaugh @mapbox/mobile
The text was updated successfully, but these errors were encountered: