Skip to content

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

@tstirrat15

Description

@tstirrat15

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions