mapbox / mapbox/mapbox-maps-android
View annotation clipped mid-screen by some phantom padding
Open
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: 16
- Devices affected:
- Maps SDK Version: 11.15.2
Observed behavior and steps to reproduce
When moving the camera, view annotations appear partially clipped, as if some invisible padding is applied
https://github.com/user-attachments/assets/018e53b1-7a3c-4c5d-843b-9440b519fd85
class MainActivity : ComponentActivity() {
private lateinit var mapView: MapView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
mapView = MapView(this)
addViewAnnotation()
setContentView(mapView)
}
fun addViewAnnotation() {
val point = Point.fromLngLat(-122.4194, 37.7749)
val viewAnnotationManager = mapView.viewAnnotationManager
val resId = R.layout.test_annotation
viewAnnotationManager.addViewAnnotation(
resId = resId,
options = viewAnnotationOptions {
geometry(point)
allowOverlap(true)
allowOverlapWithPuck(true)
ignoreCameraPadding(true)
priority(0)
annotationAnchor {
anchor(ViewAnnotationAnchor.CENTER)
}
})
}
}
Expected behavior
View annotations must be completely visible within the camera viewport
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 from the MainActivity sample with test_annotation on Android 16 and Maps SDK 11.15.2, then trace how view annotations handle camera padding while the camera moves. Done means the annotation remains completely visible within the camera viewport under the stated options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100