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

Check if google maps API has already been loaded #1

Open
svenlaater opened this issue Dec 5, 2014 · 2 comments
Open

Check if google maps API has already been loaded #1

svenlaater opened this issue Dec 5, 2014 · 2 comments

Comments

@svenlaater
Copy link

Firstly, it's nice that markerWithLabel is now available as a bower package - kudos for that.

There is an issue though that happens when google maps API has already been loaded before markerWithLabel module is required.

You have included the Google Maps API multiple times on this page. This may cause unexpected errors.

A check whether google maps API has already been included would be nice e.g.

(function(factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD
        if (!window.google) {
          define(['async!https://maps.googleapis.com/maps/api/js?key=AIzaSyD1O9N-77QOCYJ6wgsbJWgJYBJWd3K_VJg&sensor=false'], factory);
        }
@gabriellupu
Copy link
Contributor

Hi @svenlaater ! I'll try to figure out a nice way to add this and update the code. Thanks a lot for your suggestion.

@csdougliss
Copy link

@gabriellupu any chance of making this changed? Thank you

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

3 participants