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

Feature Request: Don't fire callback until load callback from google maps fires #26

Open
tstirrat15 opened this issue Mar 26, 2019 · 1 comment

Comments

@tstirrat15
Copy link

In our project, we've seen a bunch of "google maps is undefined errors" on mobile devices that seem to have slow connections, and my current hypothesis is the following:

  1. Google maps script is injected
  2. Bootstrap code is downloaded (i.e. not the library code itself)
  3. script onLoad event fires before library code has finished loading
  4. Google Maps is treated as loaded, but window.google.maps is still null/undefined.

One fix for the above behavior would be to take advantage of the callback parameter on the google maps JS request.

Is this consistent with your experience? Are there challenges to implementing this? Otherwise I'd be happy to submit a PR.

@cedricdelpoux
Copy link
Owner

I would be happy to see you PR about this. Thank you very much for your help

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

Successfully merging a pull request may close this issue.

2 participants