Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when calling disableMapTips() #5

Open
tspratt opened this issue Jul 22, 2016 · 2 comments
Open

Error when calling disableMapTips() #5

tspratt opened this issue Jul 22, 2016 · 2 comments

Comments

@tspratt
Copy link

tspratt commented Jul 22, 2016

fusiontips.js:211 Uncaught TypeError: Cannot read property 'fromLatLngToDivPixel' of null

Because a tip often remains visible after mousing off of the map, I am calling disableMapTips() on mouseout to clear it and then calling enableMapTips(opts) on mouseover to set it back up.

All seems to be working well, except for this js error in the dev console.

Is there a better way to do what I need? I could not figure out how to dynamically change suppressMapTips.

@tspratt
Copy link
Author

tspratt commented Jul 25, 2016

The error is because setTimeout is running queryFusion() even after disableMapTips is run. My local fix was to declare the delayTimeout var at the module level, then calling window.clearTimeout(delayTimeout); in disableMapTips()

@derekeder
Copy link
Owner

@tspratt Thanks! I'd welcome a pull request to fix this if you're up for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants