Skip to content

MapViewportState transitionToOverviewState AnimationDuration has no influence on the animation duration #2683

@JolanDaumas

Description

@JolanDaumas

Environment

  • Android OS version: 16
  • Devices affected: Pixel 6a
  • Maps SDK Version: 11.15.2

Observed behavior and steps to reproduce

Using MapViewportState.transitionToOverviewState,
When setting a OverviewViewportStateOptions
Parameter animationDurationMs has no influence on the animation duration

Expected behavior

The animation should follow the parameter animationDurationMs

Notes / preliminary analysis

The animation duration seems to depend on the distance from the geometry that we want to go on.
It happens when we are to close to the geometry. However, we should still have a smooth animation and not a sort of "jump"

The code :

private fun MapViewportState.toOverview(
    cameraModeOverview: CameraMode.Overview
) {
    val geometry = MultiPoint
        .fromLngLats(Polyline6.decodeToPoints(cameraModeOverview.geometryPolyline6))

    transitionToOverviewState(
        overviewViewportStateOptions = OverviewViewportStateOptions.Builder()
            .geometry(geometry)
            .padding(cameraModeOverview.paddingPx?.toEdgeInsets())
            .animationDurationMs(DEFAULT_ANIMATION_DURATION) // 600L
            .build()
        }.build()
    )
}

Additional links and references

map-v11.mp4

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