question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Map.off() doesnt work

See original GitHub issue

When trying to remove and event handler use Map.off this is not working as expected

Expected behaviour A click event listener should be removed /mapContext.off('click', layer_id, function);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
egrojMonroycommented, Sep 18, 2020

Any workaround for map.off in React? The same here, adding event works perfectly but turn if off doenst affect at all, not even errors.

1reaction
shaunclark5649commented, Dec 18, 2019

Thanks for the help, I appreciate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

map.off (type, listener) don't work · Issue #5049 - GitHub
map.off - How it works? var isActive = false; ... but I experience that map.off is not working when using it in conjunction...
Read more >
MapBox GL: Issue with "Map.Off" - Stack Overflow
Though map.off works within "onUp" it doesn't have any effect within the bottom "else" section. Below is the problem snippet of my code ......
Read more >
How to fix Maps when it crashes - Android - Google Maps Help
On your Android phone or tablet, open the Settings app . · Tap Apps & notifications. · Follow the steps on your device...
Read more >
hasLayer and removeLayer methods not working on leaflet ...
I tested your code with a geojson of mine and it's working. I've just put two console.log() to test it. If I add...
Read more >
Map Revealer for DST - Steam Workshop
From now on, reveal map doesn't work automatically. Use the keyboard shortcuts below: SHIFT + R - reveal map - works both: surface...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found