<?php
wp_enqueue_script('gmaps-API','https://maps.googleapis.com/maps/api/js?key=AIzaSyDi4wYgHpk9b_bG1raFgKe5qyRlet9C7Ng&v=3.exp&sensor=false');

$marker = get_field('marker','option');
$location = get_field('gmap_coor');
$address = get_field('address','option');
$map_controls = get_field('map_controls','option');

 var_dump($location);

// if($map_controls == 'all'):
//     $controls = 'disableDefaultUI: false,';
//
// elseif($map_controls == 'zbig'):
//     $controls = 'disableDefaultUI: true,
//         zoomControl: true,
//         zoomControlOptions: {
//           style: google.maps.ZoomControlStyle.BIG
//         },';
//
// elseif($map_controls == 'zsmall'):
//     $controls = 'disableDefaultUI: true,
//         zoomControl: true,
//         zoomControlOptions: {
//           style: google.maps.ZoomControlStyle.SMALL
//         },';
// elseif($map_controls == 'disable'):
//     $controls = 'disableDefaultUI: true,';
// else:
//     $controls = 'disableDefaultUI: true,';
// endif;

?>
<div class="map-container">
  <section class="acf-map">
      <div class="marker"
           data-lat="<?php echo $location['lat']; ?>"
           data-lng="<?php echo $location['lng']; ?>"
           <?php if($marker) echo 'data-icon="'.$marker.'" '; ?>
      ><?php if($address) echo $address; ?></div>
  </section><!--acf-map-->
</div><!--map-container-->
