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

js?v=3&callback=angular2GoogleMapsLazyMapsAPILoader&key=xxxxxx&lib…:99 You have included the Google Maps API multiple times on this page. This may cause unexpected errors. #1260

Closed
02harleen opened this issue Dec 16, 2017 · 4 comments

Comments

@02harleen
Copy link

I am working on angular 4 application. I have used two packages:- One is ng2-google-place-autocomplete and angular-google-maps. This two page does not work without a google API key. Please tell how to use multiple API keys in one application.

Packages name :- ng2-google-place-autocomplete and angular-google-maps

I get the following error in the console:- You have included the Google Maps API multiple times on this page. This may cause unexpected errors.

Please tell us how to solve this issue.

@02harleen 02harleen changed the title js?v=3&callback=angular2GoogleMapsLazyMapsAPILoader&key=AIzaSyC9PnuRk42kbCPMOvsfHpn40r5SoyN38zI&lib…:99 You have included the Google Maps API multiple times on this page. This may cause unexpected errors. js?v=3&callback=angular2GoogleMapsLazyMapsAPILoader&key=xxxxxx&lib…:99 You have included the Google Maps API multiple times on this page. This may cause unexpected errors. Dec 16, 2017
@sebholstein
Copy link
Owner

do you have multiple AgmCoreModule.forRoot() calls in different modules in your app?

@fabrizziocht
Copy link

Why don't you check this example? https://plnkr.co/edit/LdKdSj?p=preview
I used to use ng2-google-place-autocomplete , but now I prefer this solution.

@daBishMan
Copy link

@fabrizziocht how are you setting the key in your example? and thank you for sharing ?

@KthProg
Copy link

KthProg commented Jan 10, 2018

If you load the Google maps API through a script somewhere else on the page, you will get this error as this project loads the script itself on initialization.

sebholstein added a commit that referenced this issue Mar 3, 2018
This prevents that we have multiple create script tags for the
google maps api.

Fixes #315
Fixes #775
Fixes #1260
sebholstein added a commit that referenced this issue Mar 3, 2018
This prevents that we have multiple create script tags for the
google maps api.

Fixes #315
Fixes #775
Fixes #1260
sebholstein added a commit that referenced this issue Mar 18, 2018
This prevents that we have multiple create script tags for the
google maps api.

Fixes #315
Fixes #775
Fixes #1260
sebholstein added a commit that referenced this issue Mar 18, 2018
This prevents that we have multiple create script tags for the
google maps api.

Fixes #315
Fixes #775
Fixes #1260
sebholstein added a commit that referenced this issue Mar 18, 2018
This prevents that we have multiple create script tags for the
google maps api.

Fixes #315
Fixes #775
Fixes #1260
sebholstein added a commit that referenced this issue Mar 18, 2018
This prevents that we have multiple create script tags for the
google maps api.

Fixes #315
Fixes #775
Fixes #1260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants