The GeoSearch connector uses the geosearch capabilities of Algolia. Your hits must have a
_geoloc attribute to be displayed on the map.Currently, the feature is not compatible with multiple values in the _geoloc attribute.Usage
Connector Options
If
true, refine will be triggered as you move the map.Function to transform the items passed to the templates.
Render Options
The matched hits from Algolia API that have a
_geoloc attribute.The current position of the search.
currentRefinement
{ northEast: { lat: number, lng: number }, southWest: { lat: number, lng: number } }
The current bounding box of the search.
refine
(bounds: { northEast: { lat: number, lng: number }, southWest: { lat: number, lng: number } }) => void
Sets a bounding box to filter the results from the given map bounds.
Resets the current bounding box refinement.
Returns
true if the current refinement is set with the map bounds.Toggles the fact that the user is able to refine on map move.
Returns
true if the user is able to refine on map move.Sets the fact that the map has moved since the last refinement. Should be called on each map move. The call triggers a new rendering only when the value changes.
Returns
true if the map has moved since the last refinement.Sends an event to the Insights middleware.
The options passed to the connector.