← Back to City Google Maps Support
Hi! I am getting this error:
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
Can you give some instructions on how to fix this? Thank you!
Edgar
Hello Edgar,
Thank you for your message. I’ll look into this issue.
The JavaScript is currently included here: https://github.com/Ci-ty/googlemaps-plugin/blob/main/components/MapDetails.php#L49
Best regards
Hello,
A new version has been released:
- v1.0.1 - Added scripts async loading
Hope this helps.
Regards
Last updated
Hi,
To resolve the error, you should load the Google Maps JavaScript API asynchronously. You can do this by adding the loading=async parameter to your script tag.
Make sure to replace YOUR_API_KEY with your actual API key, and initMap should be the name of your initialization function. This change will help improve the performance of your application.
1-4 of 4