ibrierley / flutter_map_line_editor

A basic line/poly editor that works with flutter_map and dragmarkers.
MIT License
44 stars 25 forks source link

Moving Polygon/Polyline #17

Closed mohammedX6 closed 2 years ago

mohammedX6 commented 3 years ago

Thanks for the great plugin, how I can move the polygon/polyline to another position by long press on it?

ibrierley commented 3 years ago

I'm not sure flutter_map currently supports longpress on a poly, but I may be wrong. I think longpress only works at a map level. So an alternative would be to grab the latlng coords of longpress on the map, and then initially check if the point is inside a bounding box of the polygon (that's a simplistic but fastish check, if you need it exact, you would need to do further testing, but that may help isolate to only the polys that are in the area).