Support

Account

Home Forums General Issues Grey Google Map

Solved

Grey Google Map

  • Hi Guys,

    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.

    I got all the necessary code and javascript inserted, and have tested this part of the code with manual lat/lng data and it works perfectly fine:

    $location = get_field(‘location’);

    if( !empty($location) ):
    ?>
    <div class="acf-map">
    	<div class="marker" data-lat="51.89325" data-lng="0.898355"></div>
    </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 😉

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Grey Google Map’ is closed to new replies.