summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2018-10-29 12:54:10 +0100
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2018-10-29 15:19:13 +0100
commit516a2858a240fbab2e9de37ffc041408b7c48340 (patch)
tree08db973b8c4ae9b004bd0a800a296f7e13c938c6
parent7ae171c6f93cf41cff77b4e16444e2df1b57e9d3 (diff)
downloadqtlocation-mapboxgl-516a2858a240fbab2e9de37ffc041408b7c48340.tar.gz
[android] deliver onMapReady only at the end of the initialization block
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
index a12b5d6200..e373f6c1b1 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java
@@ -178,7 +178,6 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
// MapboxMap
mapboxMap = new MapboxMap(nativeMapView, transform, uiSettings, proj, registerTouchListener,
annotationManager, cameraChangeDispatcher);
- mapCallback.initialise();
// user input
mapGestureDetector = new MapGestureDetector(context, transform, proj, uiSettings,
@@ -217,6 +216,8 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
} else {
mapboxMap.onRestoreInstanceState(savedInstanceState);
}
+
+ mapCallback.initialised();
}
private FocalPointChangeListener createFocalPointChangeListener() {
@@ -1584,7 +1585,7 @@ public class MapView extends FrameLayout implements NativeMapView.ViewCallback {
addOnCameraDidChangeListener(this);
}
- void initialise() {
+ void initialised() {
if (!initialLoad) {
// Style has loaded before the drawing surface has been initialized, delivering OnMapReady
mapboxMap.onPreMapReady();