ACF & Google Map

Hello,

I have been trying to use ACF with the Google Maps element on a site that’s in development, and can’t figure out why it’s not working.

I have bene looking over this thread, which seemed to touch on the same issue, but so far nothing I’ve done has gotten it to work. I am nearly certain the Google Maps API side of the equation is working just fine. The map loads correctly when I add it to the custom field. The console errors suggest it’s just not picking up the values I am trying to assign to the lat and lng fields. This is the page I am testing this on. The credentials to see the page (not the admin) are:

username: demo
PW: heyday

The ACF field I have added is called “listing_details_map”.

The map is loading correctly when I enter the address through the page editor.

Within cornerstone, I have added the following dynamic content looper provider to the column: {{dc:acf:post_field field=“listing_map_details”}}

That same column is also a consumer.

In that column, I’ve nested the Google Map element and have tried to add the following into the lat. and lng. values, but none of it seems to work.

Lat: {{dc:looper:field key=“lat”}}
Lng: {{dc:looper:field key=“lat”}}

Any help on this is sincerely appreciated!

Hello @j0hnwat3rman,

Thanks for writing to us.

In order to help you with your concern, we need to check your settings, I would request you please send your details in a secure note. Please provide the following details

  • WordPress Login URL
  • Admin level username and password
  • Exact Page URL

You can find the Secure Note button at the bottom of your posts

Thanks

Not a problem. I’ve provided you guys access above.

Hello @j0hnwat3rman,

You are missing the Google Map API Key:

Google Maps no longer display if you do not set up the API key.

Best Regards.

Wow! I am embarrassed to have overlooked that field staring right at me. With that added, the looper and dynamic content is now all working as expected. Sorry for wasting your time but very much appreciate the heads-up!

Hi @j0hnwat3rman,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.