diff --git a/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java b/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java index 9a97c48ff..9d9921ca1 100644 --- a/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java +++ b/android/src/main/java/com/mapbox/mapboxgl/MapboxMapController.java @@ -94,6 +94,7 @@ final class MapboxMapController MapboxMap.OnCameraIdleListener, MapboxMap.OnCameraMoveListener, MapboxMap.OnCameraMoveStartedListener, + MapView.OnDidBecomeIdleListener, OnAnnotationClickListener, MapboxMap.OnMapClickListener, MapboxMap.OnMapLongClickListener, @@ -270,6 +271,8 @@ public void onMapReady(MapboxMap mapboxMap) { } }); + mapView.addOnDidBecomeIdleListener(this); + setStyleString(styleStringInitial); // updateMyLocationEnabled(); } @@ -1027,6 +1030,11 @@ public void onCameraTrackingDismissed() { methodChannel.invokeMethod("map#onCameraTrackingDismissed", new HashMap<>()); } + @Override + public void onDidBecomeIdle() { + methodChannel.invokeMethod("map#onIdle", new HashMap<>()); + } + @Override public boolean onAnnotationClick(Annotation annotation) { if (annotation instanceof Symbol) {