mapbox / mapbox/mapbox-maps-android

How to enable clustering feature using custom view annotation on mapbox android?

Open
#1,940 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged question
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

i have a trouble about enable clustering feature on mapbox v10 android. I have tried to reseach on homepage but didn't find any helpful way to resolve this.
I used to create point annotation manager from AnnotationPlugin before then i can add annotationConfig into them but now i must create custom view instead.

So i don't know how to add clustering for that.
Here is way to add custom annotation view into mapview.
```
val point = fromLngLat(
longitude,
latitude
)
val view = mMapView.viewAnnotationManager.addViewAnnotation(
R.layout.custom_layout,
viewAnnotationOptions {
geometry(point)
allowOverlap(true)
}
)
```

Anyone help me please? Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Android v10 viewAnnotationManager.addViewAnnotation entry point and the viewAnnotationOptions used in the example. Check the Mapbox Android documentation and existing annotation APIs to determine whether clustering is supported for custom views; done means documenting a supported configuration or confirming the limitation and its recommended alternative.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.