-
Notifications
You must be signed in to change notification settings - Fork 161
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
Google Maps JavaScript API has been loaded directly without loading=async #342
Comments
Add "loading=async" into your googlemap script tag. <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&callback=initMap&v=weekly"></script>This's solve for me. |
How to achieve that but without using an API key, just by putting the iframe and PB parameter? |
Here's the solution in razor pages and piranha cms, where the pb is taken from the share>"copy html" code in google maps `
} |
But what if we are using react-google-maps/api instead of script? |
Replace import useLoadScript with useJsApiLoader in your import from "@react-google-maps/api"; |
Estoy usando agm para cargar mis mapas y me aparece error ahora el mismo y no he podido resolverlo, alguien mas usa angular y me pueda ayudar? |
add this to your index.html in the head tag <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&libraries=YOUR_LIBRARIES&v=weekly"></script>or <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&callback=YOUR_initMap_FUNCTION&libraries=YOUR_LIBRARIES&v=weekly"></script> |
if we are using angular js with angular-google-maps? |
For who is working with React, follow this:
|
Para los que estamos usando @angular/google-maps como resolvemos este problema, he intentado con <script async
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"> |
Doesn't seem to be an issue with this repos code, closing to keep issue neat and tidy. |
I have been gettin this warning in console, anyone having the same issue?
Google Maps JavaScript API has been loaded directly without loading=async. This can result in suboptimal performance. For best-practice loading patterns please see https://goo.gle/js-api-loading
The text was updated successfully, but these errors were encountered: