OwnWeb / flutter_map_tappable_polyline

A tappable Polyline plugin for flutter_map
https://pub.dev/packages/flutter_map_tappable_polyline
MIT License
54 stars 44 forks source link

There is a way to update position on the fly? #22

Closed aweiand closed 3 years ago

aweiand commented 3 years ago

Hi!

I'm work on a map can change his layout over the time. In this case, I need a method to update the position of the polyline when a object "connected" to her change the position too. Is there a way to do this?

Thank's!

tuarrep commented 3 years ago

I don't understand your question well.

First, this package is just a wrapper around the original flutter_map Polyline.

All its positioning behavior is handled by this package.

But, the position of the polyline is calculated from the coordinates (ie real-world position) and the screen position of the map and its zoom.

So, the best way to move the polyline is to change the coordinates you've passed to its constructor.

Hope it helps.

aweiand commented 3 years ago

Hi @tuarrep !

Sorry, I don't explained it properly.... and testing again I have found the answer myself, thank`s!!