Skip to main content

Class: NearestVorSubscription

A nearest search subscription for VOR facilites.

Hierarchy

  • NearestWaypointSubscription<VorFacility>

    NearestVorSubscription

Constructors

constructor

new NearestVorSubscription(facilityLoader): NearestVorSubscription

Creates a new NearestVorSubscription.

Parameters

NameTypeDescription
facilityLoaderFacilityLoaderThe facility loader to use with this instance.

Returns

NearestVorSubscription

Overrides

NearestWaypointSubscription\<VorFacility\>.constructor

Defined in

src/sdk/navigation/NearestSubscription.ts:470

Properties

facilities

Protected Readonly facilities: VorFacility[] = []

Inherited from

NearestWaypointSubscription.facilities

Defined in

src/sdk/navigation/NearestSubscription.ts:58


facilityCache

Protected Readonly facilityCache: Map<string, VorFacility>

Inherited from

NearestWaypointSubscription.facilityCache

Defined in

src/sdk/navigation/NearestSubscription.ts:210


facilityIndex

Protected Readonly facilityIndex: Map<string, VorFacility>

Inherited from

NearestWaypointSubscription.facilityIndex

Defined in

src/sdk/navigation/NearestSubscription.ts:59


facilityLoader

Protected Readonly facilityLoader: FacilityLoader

An instance of the facility loader to search with.

Inherited from

NearestWaypointSubscription.facilityLoader

Defined in

src/sdk/navigation/NearestSubscription.ts:75


filterCb

Protected Optional filterCb: (facility: VorFacility) => boolean

Type declaration

▸ (facility): boolean

Parameters
NameType
facilityVorFacility
Returns

boolean

Inherited from

NearestWaypointSubscription.filterCb

Defined in

src/sdk/navigation/NearestSubscription.ts:209


initialNotifyFunc

Protected Readonly initialNotifyFunc: (sub: HandlerSubscription<SubscribableArrayHandler<VorFacility>>) => void

A function which sends initial notifications to subscriptions.

Type declaration

▸ (sub): void

A function which sends initial notifications to subscriptions.

Parameters
NameType
subHandlerSubscription<SubscribableArrayHandler<VorFacility>>
Returns

void

Inherited from

NearestWaypointSubscription.initialNotifyFunc

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:20


notifyDepth

Protected notifyDepth: number = 0

Inherited from

NearestWaypointSubscription.notifyDepth

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:17


onSubDestroyedFunc

Protected Readonly onSubDestroyedFunc: (sub: HandlerSubscription<SubscribableArrayHandler<VorFacility>>) => void

A function which responds to when a subscription to this subscribable is destroyed.

Type declaration

▸ (sub): void

A function which responds to when a subscription to this subscribable is destroyed.

Parameters
NameType
subHandlerSubscription<SubscribableArrayHandler<VorFacility>>
Returns

void

Inherited from

NearestWaypointSubscription.onSubDestroyedFunc

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:23


session

Protected session: undefined | NearestSearchSession<string, string>

Inherited from

NearestWaypointSubscription.session

Defined in

src/sdk/navigation/NearestSubscription.ts:61


singletonSub

Protected Optional singletonSub: HandlerSubscription<SubscribableArrayHandler<VorFacility>>

Inherited from

NearestWaypointSubscription.singletonSub

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:14


startPromiseResolves

Protected Readonly startPromiseResolves: () => void[] = []

Inherited from

NearestWaypointSubscription.startPromiseResolves

Defined in

src/sdk/navigation/NearestSubscription.ts:63


subs

Protected Optional subs: HandlerSubscription<SubscribableArrayHandler<VorFacility>>[]

Inherited from

NearestWaypointSubscription.subs

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:16


type

Protected Readonly type: FacilitySearchType

The type of facility to search for.

Inherited from

NearestWaypointSubscription.type

Defined in

src/sdk/navigation/NearestSubscription.ts:75


updatePromiseResolves

Protected Readonly updatePromiseResolves: () => void[] = []

Inherited from

NearestWaypointSubscription.updatePromiseResolves

Defined in

src/sdk/navigation/NearestSubscription.ts:64

Accessors

length

get length(): number

Returns

number

Inherit Doc

Inherited from

NearestWaypointSubscription.length

Defined in

src/sdk/navigation/NearestSubscription.ts:80


started

get started(): boolean

Whether or not this subscription has been started.

Returns

boolean

True if started, false otherwise.

Inherited from

NearestWaypointSubscription.started

Defined in

src/sdk/navigation/NearestSubscription.ts:88

Methods

addFacility

addFacility(facility, key): void

Adds a facility to the collection.

Parameters

NameTypeDescription
facilityVorFacilityThe facility to add.
keystringThe key to track this facility by.

Returns

void

Inherited from

NearestWaypointSubscription.addFacility

Defined in

src/sdk/navigation/NearestSubscription.ts:176


addSubscription

addSubscription(sub): void

Adds a subscription to this array.

Parameters

NameTypeDescription
subHandlerSubscription<SubscribableArrayHandler<VorFacility>>The subscription to add.

Returns

void

Inherited from

NearestWaypointSubscription.addSubscription

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:29


awaitStart

awaitStart(): Promise<void>

Returns

Promise<void>

Inherit Doc

Inherited from

NearestWaypointSubscription.awaitStart

Defined in

src/sdk/navigation/NearestSubscription.ts:98


doUpdate

doUpdate(lat, lon, radius, maxItems): Promise<void>

Executes an update of the nearest search subscription.

Parameters

NameTypeDescription
latnumberThe latitude of the current search position.
lonnumberThe longitude of the current search position.
radiusnumberThe radius of the search, in meters.
maxItemsnumberThe maximum number of items to return in the search.

Returns

Promise<void>

Inherited from

NearestWaypointSubscription.doUpdate

Defined in

src/sdk/navigation/NearestSubscription.ts:149


get

get(index): VorFacility

Gets an item from the array.

Parameters

NameTypeDescription
indexnumberThex index of the item to get.

Returns

VorFacility

An item.

Throws

Inherited from

NearestWaypointSubscription.get

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:77


getArray

getArray(): readonly VorFacility[]

Returns

readonly VorFacility[]

Inherit Doc

Inherited from

NearestWaypointSubscription.getArray

Defined in

src/sdk/navigation/NearestSubscription.ts:93


initialNotify

initialNotify(sub): void

Notifies a subscription of this array's current state.

Parameters

NameTypeDescription
subHandlerSubscription<SubscribableArrayHandler<VorFacility>>The subscription to notify.

Returns

void

Inherited from

NearestWaypointSubscription.initialNotify

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:176


notify

notify(index, type, modifiedItem?): void

Notifies subscriptions of a change in the array.

Parameters

NameTypeDescription
indexnumberThe index that was changed.
typeSubscribableArrayEventTypeThe type of subject event.
modifiedItem?VorFacility | readonly VorFacility[]The item modified by the operation.

Returns

void

Inherited from

NearestWaypointSubscription.notify

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:100


onResults

onResults(results): Promise<void>

Parameters

NameType
resultsNearestSearchResults<string, string>

Returns

Promise<void>

Inherit Doc

Inherited from

NearestWaypointSubscription.onResults

Defined in

src/sdk/navigation/NearestSubscription.ts:259


onSubDestroyed

onSubDestroyed(sub): void

Responds to when a subscription to this array is destroyed.

Parameters

NameTypeDescription
subHandlerSubscription<SubscribableArrayHandler<VorFacility>>The destroyed subscription.

Returns

void

Inherited from

NearestWaypointSubscription.onSubDestroyed

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:185


refilter

refilter(): void

Refilters the latest search results returned from this subscription's nearest search session.

Returns

void

Inherited from

NearestWaypointSubscription.refilter

Defined in

src/sdk/navigation/NearestSubscription.ts:238


removeFacility

removeFacility(key): void

Removes a facility from the collection.

Parameters

NameTypeDescription
keystringThe key of the facility to remove.

Returns

void

Inherited from

NearestWaypointSubscription.removeFacility

Defined in

src/sdk/navigation/NearestSubscription.ts:191


setFilterCb

setFilterCb(filter): void

Sets this subscription's post-search session filter and refilters this subscription's latest results using the new filter.

Parameters

NameTypeDescription
filterundefined | (facility: VorFacility) => booleanA function which filters results after they have been returned by this subscription's search session, or undefined if no post-search session filtering is to be performed.

Returns

void

Inherited from

NearestWaypointSubscription.setFilterCb

Defined in

src/sdk/navigation/NearestSubscription.ts:230


setVorFilter

setVorFilter(classMask, typeMask): void

Sets the VOR search filter.

Parameters

NameTypeDescription
classMasknumberA bitmask to determine which JS VOR classes to show.
typeMasknumberA bitmask to determine which JS VOR types to show.

Returns

void

Defined in

src/sdk/navigation/NearestSubscription.ts:479


start

start(): Promise<void>

Returns

Promise<void>

Inherit Doc

Inherited from

NearestWaypointSubscription.start

Defined in

src/sdk/navigation/NearestSubscription.ts:107


sub

sub(handler, initialNotify?, paused?): Subscription

Parameters

NameTypeDefault value
handlerSubscribableArrayHandler<VorFacility>undefined
initialNotifybooleanfalse
pausedbooleanfalse

Returns

Subscription

Inherit Doc

Inherited from

NearestWaypointSubscription.sub

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:41


tryGet

tryGet(index): undefined | VorFacility

Tries to get the value from the array.

Parameters

NameTypeDescription
indexnumberThe index of the item to get.

Returns

undefined | VorFacility

The value or undefined if not found.

Inherited from

NearestWaypointSubscription.tryGet

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:90


unsub

unsub(handler): void

Parameters

NameType
handlerSubscribableArrayHandler<VorFacility>

Returns

void

Inherit Doc

Inherited from

NearestWaypointSubscription.unsub

Defined in

src/sdk/sub/AbstractSubscribableArray.ts:56


update

update(lat, lon, radius, maxItems): Promise<void>

Parameters

NameType
latnumber
lonnumber
radiusnumber
maxItemsnumber

Returns

Promise<void>

Inherit Doc

Inherited from

NearestWaypointSubscription.update

Defined in

src/sdk/navigation/NearestSubscription.ts:130