flutter_map icon indicating copy to clipboard operation
flutter_map copied to clipboard

disable onTap event

Open mohammedX6 opened this issue 3 years ago • 15 comments

I want to disable map events like onTap because i want to wrap the whole map with InkWell

mohammedX6 avatar Dec 27 '21 11:12 mohammedX6

It would also be great to be able to disable longpress. If a user longpresses and then drags, I would like him to move the map. Currently this does not do anything as the onLongPress event fires.

FallenRiteMonk avatar Dec 29 '21 14:12 FallenRiteMonk

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.

github-actions[bot] avatar Jan 29 '22 01:01 github-actions[bot]

Still a issue for me

FallenRiteMonk avatar Feb 01 '22 05:02 FallenRiteMonk

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.

github-actions[bot] avatar Mar 11 '22 01:03 github-actions[bot]

No please my dear bot

mohammedX6 avatar Mar 11 '22 09:03 mohammedX6

Hi @mohammedX6, sorry for the long wait. I'll have a look into this soon.

JaffaKetchup avatar Mar 25 '22 22:03 JaffaKetchup

@mohammedX6 why not just wrap the map with the AbsorbPointer widget then wrap the entire thing with your InkWell

class Issue1111View extends StatelessWidget {
  static const routeName = '/issue_1111';

  const Issue1111View({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Issue 1111')),
      body: InkWell(
        onTap: () => print('Tapped on the map'),
        child: AbsorbPointer(
          child: FlutterMap(
            options: MapOptions(),
            layers: [
              TileLayerOptions(
                urlTemplate:
                    "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
                subdomains: ['a', 'b', 'c'],
              ),
            ],
          ),
        ),
      ),
    );
  }
}

TesteurManiak avatar Apr 19 '22 22:04 TesteurManiak

Hi there, I apologize for the long wait time. I'll try to remember to have a look at it ASAP. Thanks for your patience.

JaffaKetchup avatar May 13 '22 06:05 JaffaKetchup

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.

github-actions[bot] avatar Jun 13 '22 02:06 github-actions[bot]

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.

github-actions[bot] avatar Jul 14 '22 02:07 github-actions[bot]

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.

github-actions[bot] avatar Aug 14 '22 02:08 github-actions[bot]

Since the v3 gesture implementation is very different, it may now be possible to do this easily and reliably. I'll have a look into it - sorry for the delay.

JaffaKetchup avatar Aug 18 '22 06:08 JaffaKetchup

Good work guys !

mohammedX6 avatar Aug 19 '22 15:08 mohammedX6

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.

github-actions[bot] avatar Sep 19 '22 02:09 github-actions[bot]

I haven't had a chance to look into this yet, I've been really busy. If anyone else wants to take a look, please do! As I said, it may be easier now with v3.

JaffaKetchup avatar Sep 22 '22 20:09 JaffaKetchup

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.

github-actions[bot] avatar Oct 23 '22 02:10 github-actions[bot]

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.

github-actions[bot] avatar Nov 23 '22 02:11 github-actions[bot]

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.

github-actions[bot] avatar Dec 24 '22 01:12 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Dec 29 '22 01:12 github-actions[bot]

Closing this for now. I think there are suitable workarounds (such as IgnorePointer), and this is a fairly niche use case I would imagine.

JaffaKetchup avatar May 30 '23 16:05 JaffaKetchup