Skip to content

Conversation

@n8han
Copy link
Collaborator

@n8han n8han commented Oct 30, 2021

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

For 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.

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.
@n8han n8han added the android label Oct 30, 2021
@n8han n8han had a problem deploying to ANDROID_CI_DOWNLOADS_TOKEN October 30, 2021 15:17 Failure
@n8han n8han had a problem deploying to ANDROID_CI_DOWNLOADS_TOKEN October 30, 2021 15:17 Failure
@felix-ht
Copy link
Collaborator

felix-ht commented Nov 2, 2021

LGTM me as well :)

@felix-ht felix-ht merged commit 3a8f451 into master Nov 2, 2021
@n8han n8han deleted the AndroidOnMapIdle branch November 2, 2021 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants