Update tracked camera position in camera#onIdle #500
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When animating to a new camera position, the final resting position of
the camera is generally not received in a
camera#onMove
callback. Thelatest camera position known to the flutter-mapbox-gl framework and the
underlying mapbox-gl framework is therefore out of sync, until the next
time the camera is moved. This same issue would exist when the camera is
moved with a swipe, but it's less prominent since the camera is not
moving as quickly.
The
camera#onIdle
callback is a good place to update the cameraposition, since it is at rest and no longer moving. This insures that
the framework has an accurate camera position if the client application
requests one from its own
onCameraIdle
callback, or atany other timebetween camera moves.