mapbox / mapbox/mapbox-maps-android
How to enable clustering feature using custom view annotation on mapbox android?
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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