A hook that returns handlers to be used for map events in the properties map.
Configuration options for the hook
Optional
const { runMapSearch } = usePropertiesMapEvents(); Copy
const { runMapSearch } = usePropertiesMapEvents();
const { runMapSearch } = usePropertiesMapEvents({ replaceSearchOnBoundsChange: true }); Copy
const { runMapSearch } = usePropertiesMapEvents({ replaceSearchOnBoundsChange: true });
The runMapSearch handler takes in the current map bounds and requests new properties in that bounding box.
runMapSearch
// used together with the React Leaflet useMapEvents hookuseMapEvents({ dragend: (e) => { runMapSearch(e.target.getBounds()); }}) Copy
// used together with the React Leaflet useMapEvents hookuseMapEvents({ dragend: (e) => { runMapSearch(e.target.getBounds()); }})
A hook that returns handlers to be used for map events in the properties map.