Hey,
I’m using the google map field within a flexible content field to allow my client to add maps where they want.
I seem to have got it 99% working but i’m getting the error;
“Uncaught ReferenceError: render_map is not defined”
Currently I can see the container of the map showing but somethings stopping the render happening.
I have included the JS from the documentation in this order;
<script src="<?php bloginfo('template_url'); ?>/a/js/source/vendor/_jquery-1.11.1.js"></script> <!-- jQuery -->
<script src="<?php bloginfo('template_url'); ?>/a/js/source/vendor/_gmaps-api.js"></script> <!-- Google maps API -->
<script src="<?php bloginfo('template_url'); ?>/a/js/source/vendor/_acf-gmaps.js"></script> <!-- ACF google maps code -->
<script src="<?php bloginfo('template_url'); ?>/a/js/source/_script.js"></script> <!-- jQuery for google maps -->
and this is the php i have to display the map;
<?php elseif(get_row_layout() == "map"): ?> <!-- Map Field -->
<?php
$location = get_sub_field('map');
if( !empty($location) ):
?>
<div class="acf-map">
<div class="marker" data-lat="<?php echo $location['lat']; ?>" data-lng="<?php echo $location['lng']; ?>"></div>
</div>
<?php endif; ?>
Sorry, turns out I had things in the wrong order, thanks anyway!