City Google Maps

Google Maps with great styles. Flexible manager of maps and data, many options, easy to use.

Back to City Google Maps Support

afonso2022
afonso2022

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

City
City

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

City
City

Hello,

A new version has been released:

  • v1.0.1 - Added scripts async loading

Hope this helps.

Regards

Last updated

eceliahudson3619090207
eceliahudson3619090207

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