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:
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?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2023 Advanced Custom Fields.