// Map Facet

Looking for the old Maps add-on?

This add-on generates a map to display geocoded results. It can also filter results by showing only results within the map bounds.

Usage

This add-on generates a Map facet type, which works just like any other facet type.

Customizing the marker pins

add_filter( 'facetwp_map_marker_args', function( $args, $post_id ) {
    $args['icon'] = 'https://URL/TO/marker.png';
    return $args;
}, 10, 2 );

For more flexibility, you could alternatively use arrays to mimic Google’s JS objects:

add_filter( 'facetwp_map_marker_args', function( $args, $post_id ) {
    $args['icon'] = array(
        'url' => 'https://URL/TO/YOUR/marker.png',
        'scaledSize' => array(
            'width' => 16,
            'height' => 16
        )
    );
    return $args;
}, 10, 2 );

Changelog

0.3.2

  • Improved: removed unnecessary query
  • Fix: map width / height settings weren’t being respected
  • Fix: limit results to the active map

Details

  • Version: 0.3.2
  • Updated: Oct 3, 2017

Get Started

Download now