mapbox / mapbox/mapbox-maps-android

the view shift when language set to ar(RTL layout) and use viewAnnotationManager

Open
#1,661 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.