summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorTobrun <tobrun@mapbox.com>2016-03-31 10:53:54 +0200
committerTobrun <tobrun.van.nuland@gmail.com>2016-04-02 09:35:10 +0200
commita88e206222983d4e9bc24d87a60194c45daf59a2 (patch)
treecbb8e654a171d74f3599e634a93e69a04fba237d /platform/android
parent7d55c33f170142c8b2f4e4b4774a1c0f9820550d (diff)
downloadqtlocation-mapboxgl-a88e206222983d4e9bc24d87a60194c45daf59a2.tar.gz
[android] #4553 - remove annotations fix
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java18
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();
}
}
}