Page MenuHomePhabricator

[spike] Places: Figure out algorithm for grouping markers based on zoom level
Closed, DuplicatePublicSpike

Assigned To
Authored By
Dbrant
Sep 25 2023, 7:02 PM
Referenced Files
F41524504: opacity.png
Nov 22 2023, 11:28 PM
F41524503: strokeOpa.png
Nov 22 2023, 11:28 PM
F41524501: full.png
Nov 22 2023, 11:28 PM
F41524502: no_stroke.png
Nov 22 2023, 11:28 PM
F41524500: remove.png
Nov 22 2023, 11:28 PM
F41503098: Screenshot 2023-11-13 at 12.14.54 PM.png
Nov 13 2023, 8:20 PM

Description

This is to work with the iOS team to determine how they are currently grouping their markers on their map, and related behavior.

  • How is it decided (at what zoom level, at what proximity, etc) when two or more markers should be grouped into a larger "number" marker?
  • What is the behavior when tapping on a number marker?

Event Timeline

Frostly changed the subtype of this task from "Task" to "Spike".Oct 2 2023, 9:24 PM

There are 2 ways to achieve grouping or Clustering of the map markers:
CircleClusterLayer and SymbolLayers
The CircleLayer is a more efficient and out-of-box method for implementing clustering, with the only limitation being that we can only use circles as cluster indicators, versus SymbolLayer can customize that.
We can also have different colored circles for different sized cluster..Like this image:

Screenshot 2023-11-13 at 12.14.54 PM.png (217×467 px, 101 KB)

Full documentation for implementation:https://docs.mapbox.com/android/legacy/maps/examples/circle-layer-clustering/

This example takes a uri of all geometrical points. However, we have to create the FeatureCollection object with our wiki pages using location information in them.

Hi @scblr ,
I have moved the task here so you can sign off on the grouping idea. The better approach is to use the `CircleLayer functionality from the library, but the only design concern with it is that we can only use circles to indicate grouping, we could not use our own icon. However, we have control over the color, size and grouping of circles, as in, 0-100 could be green, 100-250 yellow, so on.. as seen in the demo above. Please let me know if that sounds good.

@Sharvaniharan, using the CircleLayer functionality sounds good to me. Would we have control over:

  • Typestyle? e.g. using the h3-button group
  • Stroke/border color and thickness of the circles?

Thanks for the infos!

Sharvaniharan renamed this task from [spike] Places: Figure out algorithm for grouping markers based on zoom level to [spike] Nearby: Figure out algorithm for grouping markers based on zoom level.Nov 20 2023, 7:02 PM

Hi @scblr

I looked around a bit and here are my findings:
I cannot customize a lot with the cluster circle, other than the fact that it has to be a circle. If we want any other shape like a triangle or star, then I will have to go with an another way slightly more complex but still doable.
Here are the things I can control: StrokeColor, strokeWidth, circleColor, circleColorOpacity, circleStrokeOpacity, and different colors for different size ranges. I have attached some screenshots so you can visualize it. Sorry for the color choices, they were best to show the opacity 😂

no_stroke.png (2×1 px, 333 KB)
full.png (2×1 px, 327 KB)
strokeOpa.png (2×1 px, 332 KB)
opacity.png (2×1 px, 425 KB)

Thank you!

Ok thanks @Sharvaniharan – good to know, and it seems like the current designs match the possibilities re: cluster style.

@Sharvaniharan do you need more info from my end here? if not, please move this to the next column, thanks!

Sharvaniharan renamed this task from [spike] Nearby: Figure out algorithm for grouping markers based on zoom level to [spike] Places: Figure out algorithm for grouping markers based on zoom level.Dec 7 2023, 2:31 AM