-
Notifications
You must be signed in to change notification settings - Fork 280
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
map:init event never triggered #27
Comments
for example: window.addEventListener("map:init", function () { document.addEventListener("DOMContentLoaded", function () { Console shows only Init:2 My base map is showing. |
Thanks for reporting ! Hum strange, the source is trivial: Do you have CustomEvent support ? Can you try with / without jquery ? |
Tried without jquery and then it tiggers. Some kind of conflict? |
Ok, good news, it may come from missing api. Which jQuery version are you' using ? |
jquery-1.10.2.min.js |
Could you please try to run this snippet please, and see if event is triggered and received ?
|
Sorry for the late reply! yes, I get a "Notified o/ " message in the console but only that. Should I be seeing anything else? |
Sorry for re-opening this. |
Don't be sorry ! I don't have much time right now to investigate the issue :( If you want to contribute a fix, don't hesitate, I would be pleased to merge it ! |
This was an issue for me in Safari, breaking all the maps. It seems to be a bug in how the event is created. Here is how I had to fix it for now:
Time permitting, maybe I can find the source issue. |
Thanks for this feedback ! It looks like it's simple as that : CustomEvent are not widely supported : https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Browser_compatibility Which leads me to think that we should maybe rewrite this piece of code in |
Hi @demiurg I have the same problem as yours, not working on Safari. It seems your solutions need a jquery ( I asked this since that |
You can extract relevant jquery event listening code applicable to safari, from jquery. |
I have not done anything out of the ordinary and for some reason the map:init event is never triggered. Using the callback works as expected. Any ideas? Best way to debug?
The text was updated successfully, but these errors were encountered: