Map Integration

Support MB FacetWP Integration Map Integration

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #21430
    EricHedvatEricHedvat
    Participant

    I have tried to create a ‘Proximity’ Facet which connects to the google maps metabox field – the LAT/LONG of the address. It doesnt seem to work, nor does it register the location coordinates in the facetwp index table in db.

    here is my meta box map field

    
    [
                    'id'            => $prefix . 'map_lat_long',
                    'type'          => 'map',
                    'name'          => esc_html__( 'Map', 'text-domain' ),
                    'address_field' => 'building_address',
                    'api_key'       => '...',
                    'region'        => '.us',
                    'std'           => '40.7831, -73.9712,14',
                ],

    The documentation states it can filter by lat/long: https://facetwp.com/documentation/facets/facet-types/proximity/

    It also says “The Data Source should be a custom field containing a comma-separated latitude, longitude.”
    My map field in the custom table is stored exactly like this (provided an address is selected via the meta box building_address field).

    Thanks

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.