mapbox / mapbox/mapbox-maps-android
the view shift when language set to ar(RTL layout) and use viewAnnotationManager
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Android OS version: 32
- Devices affected: Vivo
- Maps SDK Version: 10.6.0
Observed behavior and steps to reproduce
set the system language to ar, and the view will shift. (the view is correc when system language is English)
the implement:
val viewAnnotationManager = mapView.viewAnnotationManager
val formatViewTag = formatViewTag(tag)
val options = viewAnnotationOptions {
geometry(Point.fromLngLat(point.longitude, point.latitude))
allowOverlap(true)
}
if (viewMaps.containsKey(formatViewTag)) {
val view = viewMaps[formatViewTag]
viewAnnotationManager.updateViewAnnotation(view!!, options)
return view
}
val viewAnnotation = viewAnnotationManager.addViewAnnotation(
resId = layoutRes,
options = options
)
viewMaps[formatViewTag] = viewAnnotation
return viewAnnotation
Expected behavior
the view in correct point
Notes / preliminary analysis
I think the viewAnnotationManager not support RTL well
Additional links and references
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 by reproducing the issue with Android 32, an Arabic system locale, Maps SDK 10.6.0, and the shown viewAnnotationManager calls. Inspect how view annotations are positioned and updated under RTL, then verify that the annotation remains at the correct point in both Arabic and English layouts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100