You have included the Google Maps API multiple times on this page
See original GitHub issueI know this issue happened to others but I am pretty stuck with it since days, can’t find any solution.
Here is my @NgModule:
import { NgModule } from '@angular/core';
import { AgmCoreModule } from 'angular2-google-maps/core/index';
// Global vars
import appGlobals = require('./../globals');
@NgModule({
imports: [ AgmCoreModule.forRoot({
apiKey: appGlobals.googleMapsApiKey
}) ],
})
export class JobSearchModule {}
Here is my HTML:
<div class="col-md-12 google-maps-container">
<sebm-google-map [latitude]="mapLat"
[longitude]="mapLng"
[mapDraggable]="false"
[zoom]="zoom"
[zoomControl]="false"
[streetViewControl]="false"
(mapClick)="mapClicked($event)">
<sebm-google-map-marker [latitude]="mapLat"
[longitude]="mapLng">
</sebm-google-map-marker>
</sebm-google-map>
</div>
And here is a screenshot of what I have inside my HTML head tag:
So it looks like it is really including the API twice but I don’t know why or how.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:19 (1 by maintainers)
Top Results From Across the Web
"You have included the Google Maps API multiple times on ...
I'm getting the error "You have included the Google Maps API multiple times on this page. This may cause unexpected errors." I know...
Read more >You have included the Google Maps JavaScript API multiple ...
Got a problem with this You have included the Google Maps JavaScript API multiple times on this page. This may cause unexpected errors...
Read more >You have included the Google Maps API multiple times on this ...
Hi there, Need help to debug: "You have included the Google Maps API multiple times on this page. This may cause unexpected errors....
Read more >You have included the Google Maps API multiple times on this ...
Make sure you only load the Google Maps API once which from Super Store Finder plugin which has calls to specific libraries and...
Read more >included the Google Maps JavaScript API multiple times
The location map doesn't show up, and in the console i see the error message “You have included the Google Maps JavaScript API...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@escarabin i had similar problem. Try this.
You need to import maps in the root application module, so you do something like this:
But then if you want to use maps in a component that does not belong to this module, go to that module and do this:
@EddyP23 , What can i do if im using skd autocomplete and agm maps? Since it imports into index <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"> </script>