-
Notifications
You must be signed in to change notification settings - Fork 502
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
Provide onMapIdle
callback
#214
Conversation
Corresponding to `mapViewDidBecomeIdle` in the iOS SDK, this informs the application "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." https://docs.mapbox.com/ios/api/maps/5.6.1/Protocols/MGLMapViewDelegate.html#/c:objc(pl)MGLMapViewDelegate(im)mapViewDidBecomeIdle: I have not provided an Android implementation as I am not set up to test one yet. I would do this later if it's still missing.
Awesome contribution @n8han! We will need the android equivalent of |
Corresponding to `mapViewDidBecomeIdle` in the iOS SDK, this informs the application "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." https://docs.mapbox.com/ios/api/maps/5.6.1/Protocols/MGLMapViewDelegate.html#/c:objc(pl)MGLMapViewDelegate(im)mapViewDidBecomeIdle: I have not provided an Android implementation as I am not set up to test one yet. I would do this later if it's still missing.
* master: Support setting map's content insets (flutter-mapbox-gl#215) Provide `onMapIdle` callback (flutter-mapbox-gl#214) [example] add full page map example (flutter-mapbox-gl#201) Fix missing location indicator on iOS (flutter-mapbox-gl#176) Returned a nil result so the future completes. (flutter-mapbox-gl#216) Update README: Access Tokens for self-hosted tiles (flutter-mapbox-gl#217) Change annotation priority (flutter-mapbox-gl#222)
@xing-zheng I just tried to implement this for Android, however the @tobrun Do you have an idea what's going on there? Reading the docs I think this is not the intended behavior for |
What branch is this in so I can test? I need this functionality for my Symbol updates on Zoom. |
That shouldn't be happening :) it can happen that onMapIdle is called for invalidation of tiles and that isn't visually seen be you but what you are describing seems to be a different bug. |
Does seem weird. I have been able to get |
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.
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.
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.
Corresponding to
mapViewDidBecomeIdle
in the iOS SDK, this informs theapplication "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."
https://docs.mapbox.com/ios/api/maps/5.6.1/Protocols/MGLMapViewDelegate.html#/c:objc(pl)MGLMapViewDelegate(im)mapViewDidBecomeIdle:
I have not provided an Android implementation as I am not set up to test
one yet. I would do this later if it's still missing.