Use an ACF Google Maps field within a listing

// Based on https://www.advancedcustomfields.com/resources/google-map/#template-usage
// Replace the following code (towards the bottom of the JS):

$(document).ready(function(){
    $('.acf-map').each(function(){
        var map = initMap( $(this) );
    });
});


// With:

$(document).on('facetwp-loaded', function() {
    $('.acf-map').each(function(){
        var map = initMap( $(this) );
    });
});