Skip to content

Draggable Marker jumps upward on first long press before drag movement starts #853

@zuhriddinjon

Description

@zuhriddinjon

Environment details

  1. API: Maps Compose
  2. OS: Android 14 (also reproducible on Android 13)
  3. Device: Pixel 7 (also reproduced on Samsung devices)
  4. android-maps-compose version: [8.1.0]
  5. Google Play Services Maps version: [20.0.0]

Description

When using a draggable Marker in android-maps-compose, the marker visually "jumps" slightly upward on the first long press before any actual drag movement begins.

This happens immediately when the drag gesture is initiated, even if the user's finger has not moved yet.

Subsequent drags behave more normally, but the first interaction consistently causes a small positional shift.


Steps to reproduce

  1. Add a Marker with draggable = true
  2. Long press on the marker to initiate drag
  3. Observe that the marker shifts upward slightly before actual dragging begins

Code example

@Composable
fun MapScreenV2() {
    val markerState = rememberUpdatedMarkerState(
        position = LatLng(41.2995, 69.2401)
    )

    GoogleMap (
        modifier = Modifier.fillMaxSize()
    ) {
        Marker(
            state = markerState,
            draggable = true
        )
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions