This continues to be an issue for me. I’ve added the line “$api[‘callback’] = ‘Function.prototype’;” to my function.
For some reason though, the callback is not getting appended to the script reference when it’s published to the site, just the API key like so:
<script async src=”https://maps.googleapis.com/maps/api/js?key=API_KEY”></script>
That’s the part that is a mystery. It sounds like it’s working for some of you but not all of us.
<sigh>
@youdaman I’ve been corresponding with support on this issue. Switching the order that I was enqueuing the scripts cleared the error on the public site (i.e. enqueuing <script src=”https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY”></script> before acfmap.js)
I’ve also added the callback to the filter.
My new issue is now a Google API error using the map field in the WP admin. Support is still assisting with that but no resolution yet. Because of that error, it seems to be preventing me from setting and then pulling the lat/lng data from the fields.
I’ll update this post when that’s resolved.
Thanks @youdaman. That got rid of of the callback error.
Now, I’m seeing an error from the acfmap.js (from this example https://www.advancedcustomfields.com/resources/google-map/):
Uncaught ReferenceError: google is not defined.
Seems to be preventing the map from rendering on the page.
Thanks @saggi. That callback reference isn’t working for me either.
Oddly, I’ve used the ACF map on other sites without that callback reference and they’re working fine. Not sure what’s different.
Same issue here. Did you find a solution @saggi?