Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable onMapIdle callback for android #729

Merged
merged 1 commit into from
Nov 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ final class MapboxMapController
MapboxMap.OnCameraIdleListener,
MapboxMap.OnCameraMoveListener,
MapboxMap.OnCameraMoveStartedListener,
MapView.OnDidBecomeIdleListener,
OnAnnotationClickListener,
MapboxMap.OnMapClickListener,
MapboxMap.OnMapLongClickListener,
Expand Down Expand Up @@ -270,6 +271,8 @@ public void onMapReady(MapboxMap mapboxMap) {
}
});

mapView.addOnDidBecomeIdleListener(this);

setStyleString(styleStringInitial);
// updateMyLocationEnabled();
}
Expand Down Expand Up @@ -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) {
Expand Down