Hi,
Guess that this is pretty basic but I really can’t find it in the documentation nor at the Google API docs.
How can I show the address when clicking the map marker?
$location[‘address’] is the only thing that I found but is that the code that you need and where do you need to place it?
Thanks in advance.
Hi @nion
I’m afraid this question is more related to Google Map instead of ACF. Here’s documentation about info windows where you can show additional information (including the address) when the marker is clicked: https://developers.google.com/maps/documentation/javascript/infowindows. You can also check this thread that has a similar topic: http://stackoverflow.com/questions/5868903/marker-content-infowindow-google-maps.
For further support, please visit Google Map Community instead.
I hope this helps 🙂
Oops, already solved it by filling in a ticket… The solution is really easy, add
<p class="address"><?php echo $location['address']; ?></p>
within the marker markup.