Is there an easy way to make markers draggable around the map? I tried with a GestureDetector and using onPanDown, but the problem is once the marker is released you get screen coordinates and not GPS coordinates.
not currently. This feature would involve other things too (like moving the map when the marker is at the edge)
We could expose gesture detection handlers through the public API to make this work once https://github.com/apptreesoftware/flutter_map/issues/10 is added
Sounds good!
In case anyone finds this issue in the future: one workaround is to allow some sort of edit mode triggered by longpressing on a marker, where you then grab wherever the user next taps on the map and move the marker to that spot.
If the MapState is exposed you can then call its project and unproject methods to convert between screen points and map coordinates.
This should be possible using the Plugin api, which exposes the full MapState object, and allows you write custom layers: https://github.com/apptreesoftware/flutter_map/blob/master/flutter_map_example/lib/pages/plugin_api.dart
@avioli Draggable widget only gives me offset. How to convert offset to Point object?
Is that feature (Draggable Marker) already implemented? If yes - any example hint how it might be used ?
Not that I'm aware of. If someone would like to contribute an example I can re-purpose this issue for that.
If anyone is still interested in this, I've started a draggable marker plugin over at https://github.com/ibrierley/flutter_map_dragmarker/
Most helpful comment
If the
MapStateis exposed you can then call itsprojectandunprojectmethods to convert between screen points and map coordinates.