fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.
https://pub.dev/packages/flutter_map
BSD 3-Clause "New" or "Revised" License
2.75k stars 861 forks source link

disable onTap event #1111

Closed mohammedX6 closed 1 year ago

mohammedX6 commented 2 years ago

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

FallenRiteMonk commented 2 years ago

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.

github-actions[bot] commented 2 years ago

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.

FallenRiteMonk commented 2 years ago

Still a issue for me

github-actions[bot] commented 2 years ago

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.

mohammedX6 commented 2 years ago

No please my dear bot

JaffaKetchup commented 2 years ago

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

TesteurManiak commented 2 years ago

@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'],
              ),
            ],
          ),
        ),
      ),
    );
  }
}
JaffaKetchup commented 2 years ago

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.

github-actions[bot] commented 2 years ago

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] commented 2 years ago

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] commented 2 years ago

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.

JaffaKetchup commented 2 years ago

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.

mohammedX6 commented 2 years ago

Good work guys !

github-actions[bot] commented 2 years ago

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.

JaffaKetchup commented 2 years ago

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.

github-actions[bot] commented 2 years ago

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] commented 1 year ago

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] commented 1 year ago

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] commented 1 year ago

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

JaffaKetchup commented 1 year ago

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