-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
can i update the line in Real time by adding more latlng #9
Comments
I think so (if I understand correct), as it's doing that all the time anyway. Just remember to call setState on the whole thing to update. |
will that animate the line from the start ou just then new update? |
ah maybe I'm misunderstanding then...it will probably depend on your settings, if its mid-animation and you add some points, I'm not quite sure what will happen. Try it :). |
will try and see how it works |
I have a feeling it will probably just animate the original line (it kind of uses originalPoints to then build an interpolated state builtPoints, which probably won't be updated), as it duration won't really make sense, when bits get added on. So I think it would only work "properly" on a fresh set of data each time. Apologies if I confused you with that earlier as I misunderstood what you were after... It sounds a bit like you want some slightly delayed animation based on real time information ? Just trying to think if there's a way around that, ie build the main line each time (non-animated as the time has passed), and just use the LineAnimator for each new delayed point, but it depends on the exact use case really. |
Just to explain a bit clearer...
As you get a new point, you create a new LineAnimator from the last point of alreadyCompletePolyline, to the new point, for a duration of 5 seconds for example. |
@ibrierley thanks, I'm currently using flutter_map v3, i'll try it when this plugin gets updated |
is updating the line in Real time by adding more latlng possible ?
The text was updated successfully, but these errors were encountered: