Skip to main content

Class: NearestRepoFacilitySearchSession<F, IcaoDataType>

Defined in: src/sdk/navigation/FacilityLoader.ts:1215

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

Type Parameters​

Type Parameter
F extends FacilityRepositorySearchableTypes
IcaoDataType extends NearestIcaoSearchSessionDataType

Implements​

Constructors​

Constructor​

new NearestRepoFacilitySearchSession<F, IcaoDataType>(repo, sessionId, facilityType, icaoDataType): NearestRepoFacilitySearchSession<F, IcaoDataType>

Defined in: src/sdk/navigation/FacilityLoader.ts:1231

Creates an instance of a NearestRepoFacilitySearchSession.

Parameters​

ParameterTypeDescription
repoFacilityRepositoryThe facility repository in which to search.
sessionIdnumberThe ID of this session.
facilityTypeFThe type of facility for which this session searches.
icaoDataTypeIcaoDataTypeThe data type of the ICAOs provided by this session.

Returns​

NearestRepoFacilitySearchSession<F, IcaoDataType>

Properties​

icaoDataType​

readonly icaoDataType: IcaoDataType

Defined in: src/sdk/navigation/FacilityLoader.ts:1235

The data type of the ICAOs provided by this session.

Implementation of​

NearestCustomFilteredSearchSession.icaoDataType

Methods​

searchNearest()​

searchNearest(lat, lon, radius, maxItems): Promise<NearestSearchResults<NearestIcaoSearchSessionDataTypeMap[IcaoDataType], NearestIcaoSearchSessionDataTypeMap[IcaoDataType]>>

Defined in: src/sdk/navigation/FacilityLoader.ts:1239

Searches for nearest facilities from the specified point.

Parameters​

ParameterTypeDescription
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<NearestIcaoSearchSessionDataTypeMap[IcaoDataType], NearestIcaoSearchSessionDataTypeMap[IcaoDataType]>>

The nearest search results.

Implementation of​

NearestCustomFilteredSearchSession.searchNearest


setFacilityFilter()​

setFacilityFilter(filter?): void

Defined in: src/sdk/navigation/FacilityLoader.ts:1307

Sets the filter for this search session.

Parameters​

ParameterTypeDescription
filter?GeoKdTreeSearchFilter<FacilityTypeMap[F]>A function to filter the search results.

Returns​

void

Implementation of​

NearestCustomFilteredSearchSession.setFacilityFilter