ibrierley / flutter_map_dragmarker

A drag marker for flutter_map
BSD 3-Clause "New" or "Revised" License
54 stars 37 forks source link

Rotatable markers? #13

Closed 8Duke8 closed 2 years ago

8Duke8 commented 2 years ago

Is there a way how to achieve rotatable draggable markers similarly like the original flutter_map markers that have rotate boolean property? I need draggable map markers to automatically rotate on map rotation.

ibrierley commented 2 years ago

Do you mean you want them to anti-rotate to the map (so always upright), or rotate with the map (so the marker would not be upright)?

8Duke8 commented 2 years ago

I am sorry. Yeah, I need them always upright.

ibrierley commented 2 years ago

Ok, have added the option rotateMarker and bumper version to 1.1.0. Default is on, so it rotate opposite to the map rotation.

8Duke8 commented 2 years ago

@ibrierley it seems it is working correctly. It is exactly what I needed. Thanks a lot for the quick implementation. ;-)

ibrierley commented 2 years ago

You're welcome, thanks for the feedback.

8Duke8 commented 2 years ago

@ibrierley one more question. Is there a way how to easily set the DragMarker to not be draggable at all? I can always use the original Marker, but a draggable boolean could come in handy :-). I would appreciate any tips. Thanks in advance.

ibrierley commented 2 years ago

There's no current easy way. One could probably swap out the gesturedetector in the code based on a toggle, but I'm not sure if there would be any odd unintended consequences doing it like that.

8Duke8 commented 2 years ago

@ibrierley thanks anyway