diff options
Diffstat (limited to 'platform/android')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java | 18 |
1 files changed, 8 insertions, 10 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 5119f2e7b0..96631c91f6 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 @@ -399,19 +399,17 @@ public class MapView extends FrameLayout { addOnMapChangedListener(new OnMapChangedListener() { @Override public void onMapChanged(@MapChange int change) { - if (change == DID_FINISH_RENDERING_MAP_FULLY_RENDERED) { + if (change == DID_FINISH_RENDERING_MAP_FULLY_RENDERED && mInitialLoad) { + mInitialLoad = false; reloadIcons(); reloadMarkers(); adjustTopOffsetPixels(); - if (mInitialLoad) { - mInitialLoad = false; - if (mOnMapReadyCallbackList.size() > 0) { - Iterator<OnMapReadyCallback> iterator = mOnMapReadyCallbackList.iterator(); - while (iterator.hasNext()) { - OnMapReadyCallback callback = iterator.next(); - callback.onMapReady(mMapboxMap); - iterator.remove(); - } + if (mOnMapReadyCallbackList.size() > 0) { + Iterator<OnMapReadyCallback> iterator = mOnMapReadyCallbackList.iterator(); + while (iterator.hasNext()) { + OnMapReadyCallback callback = iterator.next(); + callback.onMapReady(mMapboxMap); + iterator.remove(); } } } |