ibrierley / flutter_map_dragmarker

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

Is there way to combine flutter_map_marker_popup and flutter_map_dragmarker? #40

Open S-Man42 opened 1 year ago

S-Man42 commented 1 year ago

Previously I implemented my draggable marker on my own. So I was able to react on the tap to open a popup using the PopupMarker plugin.

Since their update from v3 to v4 the onPanUpdate is not called anymore (funny enough: all other events still work as onVerticalDragUpdate).

I tried to implement the onVerticalDragUpdate and onHorizontalDragUpdate instead as you did, but it worked not as expected. I only was able to drag the marker in exact horizontal and vertical direction. Reading your code did not make it clear to me how you bypassed this behaviour to enable panning in all directions, unfortunately. (Moreover it seems to me more like a dirty workaround to use these two events instead the plain onPanUpdate, which worked quite well all the time...)

However, I tried to integrate your plugin directly but I am not sure how to keep the popup functionality because both plugins are different kind of layers...

Do you see a way around this?

ibrierley commented 1 year ago

Heya, tbh I don't know enough of the popup plugin to help really. I can't remember exactly about the onPan vs onVert/Hor, I have a feeling there was a conflict with the gesturehandler and onPan, but I may well be remembering that wrong, it was a long time ago

S-Man42 commented 1 year ago

Do you have any solution to open a Popup or similar to your DragMarkers?

Maybe way to hook onto onTap or something?

ibrierley commented 1 year ago

Well, you can certainly pass a func to onTap parameter I guess, I'm not sure if that would help ?

timur-harin commented 12 months ago

@S-Man42 Did you make a solution?

S-Man42 commented 12 months ago

Unfortunately, not yet. For my hotfix I downgraded the Flutter Map library version and then it worked again. But this cannot be the final solution