Support

Account

Home Forums General Issues Solution needed for slow Google Maps loading. Reply To: Solution needed for slow Google Maps loading.

  • Rather than having users download the map image and then load the actual map I was thinking, how about I leave a white space where the map will be rendered and then load the google maps.

    The main problem I am running into now is adding to src=”https://maps.googleapis.com/maps/api/js?key=KEYHERE&callback=initMap” &callback=initMap does not work. It gives some sort of console error “_.te”

    I figure it is not seeing the function initMap that is in the jquery code on the https://www.advancedcustomfields.com/resources/google-map/ page.

    When I use the js css and html code on this site:
    https://developers.google.com/maps/documentation/javascript/overview#maps_map_simple-javascript
    I am able to include the &callback=initMap in the src field and the map loads last and the performance in core web vitals is 95%+. Without the &callback=initMap I am unable to get the performance rating above 80%.

    Any suggestions on how to get &callback=initMap working with ACF Google Maps?