summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Paczos <lukasz.paczos@mapbox.com>2018-04-04 11:55:46 +0200
committerGitHub <noreply@github.com>2018-04-04 11:55:46 +0200
commit25d0f7157d9ca5bd6375f97cd0f26af6765cb449 (patch)
tree3a3267c1bae74f005ca1dac754f8ab7ea6067bef
parent1730756e87550b6ca313051c9b87806dac561b18 (diff)
downloadqtlocation-mapboxgl-25d0f7157d9ca5bd6375f97cd0f26af6765cb449.tar.gz
[android] invalidate camera position before delivering onMapReady (#11585)
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
index f23d3bd7f9..6271a5a611 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
@@ -155,6 +155,7 @@ public final class MapboxMap {
* Called before the OnMapReadyCallback is invoked.
*/
void onPreMapReady() {
+ invalidateCameraPosition();
annotationManager.reloadMarkers();
annotationManager.adjustTopOffsetPixels(this);
}
@@ -815,7 +816,7 @@ public final class MapboxMap {
/**
* Invalidates the current camera position by reconstructing it from mbgl
*/
- void invalidateCameraPosition() {
+ private void invalidateCameraPosition() {
CameraPosition cameraPosition = transform.invalidateCameraPosition();
if (cameraPosition != null) {
transform.updateCameraPosition(cameraPosition);