Skip to content

View annotation clipped mid-screen by some phantom padding #2681

@inti7ary

Description

@inti7ary

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

Screen.Recording.2025-10-11.at.12.20.36.AM.mov
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🪲Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions