facetwp replace listify map with map facet

<?php
/** remove listify's default map and replace with a map facet **/
add_action( 'listify_output_map', function() {
    remove_action( 'listify_output_map', array( 'Listify_Results', 'output_map' ) );

}, 1 );

add_action( 'listify_output_map', function() { ?>
    <div class="job_listings-map-wrapper listings-map-wrapper--<?php echo esc_attr( get_theme_mod( 'listing-archive-map-position', 'side' ) ); ?>">

	<div class="job_listings-map">
		<?php echo facetwp_display( 'facet', 'map' ); ?>
    </div>
    
</div>
<?php });

/**
 * remove listify's map script
 */
add_action( 'listify_facetwp_sort', function() {
    wp_dequeue_script( 'listify-map' );
}, 20);