[FEATURE] Ability to ignore long-presses and allow dragging
hi, Generally, there is no problem in dragging the map, but after long-pressing the screen, dragging the map cannot move. Is there any attribute that needs to be set? Thank you.
Hi there, I've personally never experienced this issue before. Can you please provide a minimal reproducible example to help us debug the issue? Thanks :)
Is this what you're experiencing: https://github.com/fleaflet/flutter_map/issues/1111#issuecomment-1002622973?
Is this what you're experiencing: #1111 (comment)?
The sample program provided by flutter_map also has the same problem. thanks.
hi, Drag directly after long-pressing on the map, the map cannot be moved。
thank you.
Ah I see. This isn't a bug, but also not intended functionality. This is a very rare use case: can I ask what you need this for, if you don't mind?
Ah I see. This isn't a bug, but also not intended functionality. This is a very rare use case: can I ask what you need this for, if you don't mind?
hi I know this is not a bug, but it is a bit inconvenient for users to use. I have tested other map apps and there is no such problem. I don't need the long-press function, so long-press-drag and click-drag must be treated as the same action.
Thanks for your reply
In this case, this will have to be converted to a feature request. Note that waiting times on feature requests are currently indefinite at this time - unless a PR can be supplied - as we (maintainers) are quite stretched at the moment. Thanks for your interest in 'flutter_map', and we are happy to answer any more questions! My apologies for the late reply.
hi,
I'm sorry I can't understand your explanation. How to modify the program? Is there a way to do it? Thank you~
Hi @victor0726, Unfortunately, there is no way to do it right now. I've converted to a feature request so it may be implemented in the future.
If you want a quick hack, comment out the onLongPress: _positionedTapController.onLongPress lines (probably lines 142 & 152 of lib/src/map/flutter_map_state.dart).
I haven't got time to dig into it further atm, but I guess there could be an option pulled in, so it would look something like...
onLongPress: option.disableLongPress ? null : _positionedTapController.onLongPress,
Or maybe something like...
onLongPress: widget.options.onLongPress == null ? null : _positionedTapController.onLongPress
Just some thoughts.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
@ibrierley Should I make a PR for this?
Yes, sorry I haven't had a lot of time of late. Feel free to have a bash!
Actually, after looking around a bit, not sure I like the look of that in there. We need to sort out the gestures and events system instead of putting quick fixes like this in.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
@victor0726 Can you try the new v3 betas, and see if they fix your problem?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
@victor0726 Any luck with v3?
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.