Support

Account

Home Forums Add-ons Repeater Field Google map – unique marker ID for hovering Reply To: Google map – unique marker ID for hovering

  • Hi @mathieu

    In the example you shared, the code uses an XML file to provide the locations. It’s located here: http://www.geocodezip.com/example.xml. The code to call it is this one:

    downloadUrl("example.xml", function(doc) {

    So the only thing you need to do is to generate an XML file and add the location from your Google Map custom field. To get the location (latitude and longitude), you can do it like this:

    <?php 
    $location = get_sub_field('location');
    ?>
    <marker lat="<?php echo $location['lat']; ?>" lng="<?php echo $location['lng']; ?>" html="Some stuff to display in the<br>Third Info Window"  label="Marker Three" />

    To learn more about it, please take a look at this page: https://www.advancedcustomfields.com/resources/google-map/. Unfortunately, customizing Google Map is not related to ACF anymore. If you need further support, please take a look at their support forum. I’m sorry for the inconvenience.

    I hope this makes sense. Thanks 🙂