Flutter_map: Interactive Polygon

Created on 17 Aug 2019  路  4Comments  路  Source: fleaflet/flutter_map

I would like to draw a polygon that can be edited by the user. E.g. a square, with "handles" on the corners, that can be drag-and-dropped to make it a generic quadrilateral.

I've read through PRs and issues, and I understand that it is possible to draw polygons, but I'm not sure what it implies to "edit" one.

I am new to the library, so any pointer/keyword would be welcome!

Most helpful comment

I've made the GeoDraw package that let the user draw polygons on the map (as well as lines and markers). There is no edit but it should be easy to implement: use markers to materialize the polygon's points, move the point on tap and update the polygon. I don't know how to use drag and drop but it should be doable too.

All 4 comments

I've made the GeoDraw package that let the user draw polygons on the map (as well as lines and markers). There is no edit but it should be easy to implement: use markers to materialize the polygon's points, move the point on tap and update the polygon. I don't know how to use drag and drop but it should be doable too.

That's interesting. And would that work with flutter_map? I'll see if I can try your example to see how responsive it is when moving the map. My fear is always that the polygon is not synchronized with the map :D.

And would that work with flutter_map?

That's built on flutter_map. Don't worry about responsiveness: polygons are fine with flutter_map: I"ve used maps with thousands of polygons and it was fluid

Awesome! I'll have a look at that. Closing this issue in the meantime.

Thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings