Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Moving camera is broken when map it tilted #13449

Closed
invised opened this issue Nov 25, 2018 · 1 comment
Closed

Moving camera is broken when map it tilted #13449

invised opened this issue Nov 25, 2018 · 1 comment
Labels
Android Mapbox Maps SDK for Android

Comments

@invised
Copy link

invised commented Nov 25, 2018

Steps to reproduce

  1. Set map tilt:
    mapboxMap.cameraPosition = CameraPosition.Builder()
              .tilt(MapboxConstants.MAXIMUM_TILT)
              .build()
  1. Move camera to new bounds:
    val boundsUpdate = CameraUpdateFactory.newLatLngBounds(latLngBounds)
    mapboxMap.animateCamera(boundsUpdate)

or

    val cameraPosition = mapboxMap.getCameraForLatLngBounds(bounds, mapboxMap.cameraPosition.bearing, MapboxConstants.MAXIMUM_TILT)
    mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))

Expected behavior

Camera should be centered around the specified bounds

Actual behavior

Camera moves in a random fashion. It seems like only the first time it is centered properly, all the subsequent moves are broken (especially zoom)

Configuration

Android versions: 8.1, 9.0
Device models: Android emulator, Nexus 6P, Huawei MediaPad M5...
Mapbox SDK versions: 7.0.0-alpha.2, 6.6.7, 6.3.0

This bug is also reproducible in the Mapbox Demo app from Play Store.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Nov 26, 2018
@LukasPaczos
Copy link
Contributor

Thanks for reaching out @invised! This issue is directly connected to #2259 and is going to be resolved at the same time, therefore, closing as a duplicate. Unfortunately, there is no clear workaround at this point, but we will report in #2259 as soon as we know more.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

3 participants