FacetWP – index WPJM geolocation when Data source = geolocation_lat

<?php

function index_latlng( $params, $class ) {
    if ( 'jobs_location' == $params['facet_name'] ) {
        $params['facet_value'] = get_post_meta( $params['post_id'], 'geolocation_lat', true );
        $params['facet_display_value'] = get_post_meta( $params['post_id'], 'geolocation_long', true );
    }
    return $params;
}
add_filter( 'facetwp_index_row', 'index_latlng', 10, 2 );