Marker Lags while rotating
Describe the bug While using the plugin, i rotate the marker and it often lags or stops while turning.
To Reproduce Steps to reproduce the behavior:
Expected behavior Rotation of the marker without lag or stops.
Screenshots Please See attached video
Smartphone (please complete the following information):
- Device: Android
Additional context Do not know if the plugin filters data. Maybe if there is a filter, it causes the marker to stop rotating while the values are dismissed
.
Hello,
Thank you for reporting this issue. To better understand the problem and provide assistance, please provide the following information:
-
Version Information: Could you please let us know which version of the
flutter_map_location_markerpackage you are currently using? - Heading Stream Setup: Are you using the default heading stream or a customized one? If it's customized, please provide relevant code snippets.
-
Value of
alignDirectionAnimationDuration: Please provide the value you have set foralignDirectionAnimationDuration.
We initially suspect that the issue might be due to the animation duration being too short. If the interval between updates in the heading stream is larger than the alignDirectionAnimationDuration, it could cause the animation to appear stuttered or discontinuous, resulting in the behavior you're seeing.
We look forward to your response to further analyze the issue.
Thank you!
Hi!
Thanks for responding.
1-The plugin version is ^10.0.0 2-The heading stream is the default 3- alignDirectionAnimationDuration is not being used/decalred.
Hope this info helps!
Thanks!
I can repoduce this issue in also example project. Since RotationSensor.samplingPeriod defaults to 200ms but alignDirectionAnimationDuration defaults to 50ms. To quick fix this issue, you can set RotationSensor.samplingPeriod at anytime before create the map widget, such as on application startup.
RotationSensor.samplingPeriod = SensorInterval.gameInterval; // This set RotationSensor.samplingPeriod to 20ms.
I will prepare an update for this issue.
A new release v10.1.0 is published to resolve this issue.