Love the ACF plugin and have been using it for many of my projects, just got some issues with the Google Map / Location part of things.
$location = get_field(‘location’);
if( !empty($location) ):
<div class="marker" data-lat="51.89325" data-lng="0.898355"></div>
<?php endif; ?>
Now as soon as I enter <?php echo $location[‘lat’]; ?> and <?php echo $location[‘lng’]; ?> in the data attributes, the map is grey and does not display the actual address, it has however the Zoom and the navigation buttons. I’ve tried multiple locations within the administration menu but the map stays grey, it works perfect with manual data as mentioned above so I am not sure what’s going on.
I will have to look in the database to make sure the lat/lng are saved correctly but I don’t have that access right now.
Any advise or things I can look at?
Just an update, I tried to echo out lng/lat and it shows “||” so these fields are not properly saved, would appreciate any help or advise.
Fixed it, trying to go for $location = get_field(‘location’); when I renamed my field map_location 😉