INTRODUCE: Map Facet
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.
The Data Source should be a custom field containing a comma-separated latitude, longitude.
Common data sources:
- Advanced Custom Fields has a Google Maps field type that provides geolocation. For the facetメs Data Source, choose the field name underneath the モAdvanced Custom Fieldsヤ header.
- WP Job Manager plugin automatically stores geolocation data. Set the facetメs Data Source to geolocation_lat.
Marker content
Enter display code for the content that displays when a marker is selected. The following example outputs the title, link, and excerpt.
Available options
Other data source
Choose a longitude field if stored separately from the latitude
Map Design
Choose a design/color scheme for the map
Marker clustering
This option will group markers into clusters
Marker limit
モShow all resultsヤ will show all markers that match the results, モShow current page resultsヤ will only display markers matching the results on the current page of paginated results
Map width / height
Width and height of map. Use unitless for px, ex. 300, or with %, ex. 100%
Zoom min / max
Set the zoom bounds between 1 (minimum zoom) and 20 (maximum zoom)
Default lat / lng / zoom
Centers map to this location when thereメs no map results
Using a Google Maps API Key
The map facet requires a valid Google Maps API key. After generating an API key, add it to Settings > Facet > Settings. Both the proximity facet and map facet will use this key.
- Changing the map type
- Customizing the marker pins
- Map marker hooks
Reviews
There are no reviews yet.