-
Notifications
You must be signed in to change notification settings - Fork 197
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
Fixed and improved asynchronous loading #28
base: master
Are you sure you want to change the base?
Conversation
1. Added $loadAsynchDelay config variable to help prevent issue where maps initialize before its elements finish loading. 2. Moved google.maps.InfoWindow constructor inside loadScript function, so it doesn't error out on asynchronous pages. 3. Added code (line 2117) to prevent Google Maps API from loading multiple times on subsequent AJAX calls. 4. Minor fix on line 2127 to kick off loadScript function on AJAX calls.
Replaced hardcoded map name with config variable so listeners work.
Hi mike, i try to do it but was impossible: the console say me when i click a button in order to load a map by ajax: Uncaught ReferenceError: google is not defined Do you have any idea, you have a example working?? I don´t know what i am doing wrong.... |
cristoj, Here is the code that I am currently using with my pull request code. Note that I use an internal id variable to compensate for the fact that multiple maps may load depending on which tabs are open in my interface. In the controller:
In the view:
Hope that helps... |
Now works perfect, thanks a lot!! |
Hi, i was testing it and i had to change in line 1198-1199 the iw_map variable to global one, because when i click the marker to show the infowindow, the console says me that this var is not defined, and now works fine |
thanks alot this library very coolll |
Hey guys, BIOSTALL, you should merge this commit into master. Yesterday, i tested this change in my code and this worked nicely but i was searching the solution in Internet because i thought this problem was resolved and merged in master. You loadAsynchronously option doesn´t work, it´s not cool BIOSTALL. So, thank you very much¡ |
bro thank for your code.. it works now |
I made the following changes to get this working in AJAX requests. It works great now -- I hope you can pull these changes into the project.
Thanks,
Mike