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

Cherry-pick: Enable onMapIdle callback for android (upstream#729) #47

Merged
merged 2 commits into from
Nov 19, 2021

Conversation

m0nac0
Copy link
Collaborator

@m0nac0 m0nac0 commented Nov 19, 2021

No description provided.

n8han and others added 2 commits November 19, 2021 15:48
This is the android piece of PR #214. The listener
`MapView.OnDidBecomeIdleListener` is less well documented than its iOS
counterpart. We just have this to go on:

> Interface definition for a callback to be invoked when the map has
> entered the idle state.
https://docs.mapbox.com/android/maps/api/9.6.1/com/mapbox/mapboxsdk/maps/MapView.OnDidBecomeIdleListener.html

Fr the iOS framework method we have more detailed information:

> Tells the delegate that the map view is entering an idle state, and no
> more drawing will be necessary until new data is loaded or there is
> some interaction with the map.

> * No camera transitions are in progress
> * All currently requested tiles have loaded
> * All fade/transition animations have completed
https://docs.mapbox.com/archive/ios/maps/api/5.6.1/Protocols/MGLMapViewDelegate.html#/c:objc(pl)MGLMapViewDelegate(im)mapViewDidBecomeIdle:

After testing with these changes, it does seem to be the case that it is
only invoked after the tiles are loaded. So I think this is the correct
analogue for the iOS listener.
@m0nac0 m0nac0 merged commit 37a6685 into main Nov 19, 2021
@m0nac0 m0nac0 deleted the m0-cp-729-onmapidle-android branch November 19, 2021 15:20
github-actions bot pushed a commit that referenced this pull request Nov 19, 2021
This is the android piece of PR #214. The listener
 is less well documented than its iOS
counterpart. We just have this to go on:

> Interface definition for a callback to be invoked when the map has
> entered the idle state.
https://docs.mapbox.com/android/maps/api/9.6.1/com/mapbox/mapboxsdk/maps/MapView.OnDidBecomeIdleListener.html

Fr the iOS framework method we have more detailed information:

> Tells the delegate that the map view is entering an idle state, and no
> more drawing will be necessary until new data is loaded or there is
> some interaction with the map.

> * No camera transitions are in progress
> * All currently requested tiles have loaded
> * All fade/transition animations have completed
https://docs.mapbox.com/archive/ios/maps/api/5.6.1/Protocols/MGLMapViewDelegate.html#/c:objc(pl)MGLMapViewDelegate(im)mapViewDidBecomeIdle:

After testing with these changes, it does seem to be the case that it is
only invoked after the tiles are loaded. So I think this is the correct
analogue for the iOS listener.

Co-authored-by: Nathan <nathan@transit.app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants