Skip to main content

Interface: GeoVisProximitySearchValue

Defined in: react/proximityContext.ts:11

The proximity search as the app reads it, from useGeoVisProximitySearch: where it stands, what it found, and what changes it — so the app can draw its own view of the results, such as a list beside the map, kept in step with the pins.

Properties​

anyPoint​

anyPoint: boolean

Defined in: react/proximityContext.ts:62

Whether a click on any point of the map searches from there — the mode the reader turns on with the button proximitySearch.fromAnyPoint offers, and that the search from a point turns off again. Always false without it.


categoryId​

categoryId: string | null

Defined in: react/proximityContext.ts:49

The category whose places the map shows, the others' pins taken off it; null while every place is shown. results still holds every category's places, so the app's own view can count them all.


clear​

clear: () => void

Defined in: react/proximityContext.ts:43

Clears the search, as the bar's × does.

Returns​

void


fromPoint​

fromPoint: boolean

Defined in: react/proximityContext.ts:26

Whether the search started from a point of the map the reader clicked, not a pin — see proximitySearch.fromAnyPoint.


fromUser​

fromUser: boolean

Defined in: react/proximityContext.ts:21

Whether the search started from the reader's location, not a pin.


origin​

origin: [number, number] | null

Defined in: react/proximityContext.ts:19

The searched point, [lng, lat]; null while idle.


radii​

radii: number[]

Defined in: react/proximityContext.ts:30

The radii the reader can choose between, in metres, ascending.


radius​

radius: number

Defined in: react/proximityContext.ts:28

The radius shown, in metres.


results​

results: ProximityHit[]

Defined in: react/proximityContext.ts:35

The places within radius, nearest first, each with its distance from origin — the ones the map shows as pins.


select​

select: (id) => void

Defined in: react/proximityContext.ts:39

Opens a place's card on the map, or closes it when it is the open one.

Parameters​

ParameterType
idstring | number

Returns​

void


selectedId​

selectedId: string | number | null

Defined in: react/proximityContext.ts:37

The place whose card is open on the map, or null.


setAnyPoint​

setAnyPoint: (on) => void

Defined in: react/proximityContext.ts:68

Turns that mode on or off, as the button does. Turning it off keeps the search shown; only new clicks off the pins stop searching. Does nothing without fromAnyPoint.

Parameters​

ParameterType
onboolean

Returns​

void


setCategory​

setCategory: (categoryId) => void

Defined in: react/proximityContext.ts:55

Shows only one category's places on the map — null shows them all — closing the open card when its place is not of that category. Each new search shows them all again.

Parameters​

ParameterType
categoryIdstring | null

Returns​

void


setRadius​

setRadius: (radius) => void

Defined in: react/proximityContext.ts:41

Shows another of radii, asking only for the ring beyond the widest searched.

Parameters​

ParameterType
radiusnumber

Returns​

void


status​

status: "idle" | "loading" | "done"

Defined in: react/proximityContext.ts:17

idle before a search, loading while an answer is awaited — the first one, or a widening when results already holds places — and done once it arrived.