Skip to main content

Class: NearestRepoFacilitySearchSession<F>

A session for searching for nearest facilities that uses the facility repository.

Type parameters

NameType
Fextends RepoFacilityType

Implements

Constructors

constructor

new NearestRepoFacilitySearchSession<F>(repo, sessionId): NearestRepoFacilitySearchSession<F>

Creates an instance of a NearestUserSearchSession.

Type parameters

NameType
Fextends RepoFacilityType

Parameters

NameTypeDescription
repoFacilityRepositoryThe facility repository in which to search.
sessionIdnumberThe ID of the session.

Returns

NearestRepoFacilitySearchSession<F>

Defined in

src/sdk/navigation/FacilityLoader.ts:886

Methods

searchNearest

searchNearest(lat, lon, radius, maxItems): Promise<NearestSearchResults<string, string>>

Searches for nearest facilities from the specified point.

Parameters

NameTypeDescription
latnumberThe latitude, in degrees.
lonnumberThe longitude, in degrees.
radiusnumberThe radius around the point to search, in meters.
maxItemsnumberThe maximum number of items.

Returns

Promise<NearestSearchResults<string, string>>

The nearest search results.

Implementation of

NearestSearchSession.searchNearest

Defined in

src/sdk/navigation/FacilityLoader.ts:889


setUserFacilityFilter

setUserFacilityFilter(filter?): void

Sets the filter for this search session.

Parameters

NameTypeDescription
filter?GeoKdTreeSearchFilter<F>A function to filter the search results.

Returns

void

Defined in

src/sdk/navigation/FacilityLoader.ts:924