Class: NearestVorSubscription
A nearest search subscription for VOR facilites.
Hierarchy
NearestWaypointSubscription
<VorFacility
>↳
NearestVorSubscription
Constructors
constructor
• new NearestVorSubscription(facilityLoader
): NearestVorSubscription
Creates a new NearestVorSubscription.
Parameters
Name | Type | Description |
---|---|---|
facilityLoader | FacilityLoader | The facility loader to use with this instance. |
Returns
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
Name | Type |
---|---|
facility | VorFacility |
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
Name | Type |
---|---|
sub | HandlerSubscription <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
Name | Type |
---|---|
sub | HandlerSubscription <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
Name | Type | Description |
---|---|---|
facility | VorFacility | The facility to add. |
key | string | The 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
Name | Type | Description |
---|---|---|
sub | HandlerSubscription <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
Name | Type | Description |
---|---|---|
lat | number | The latitude of the current search position. |
lon | number | The longitude of the current search position. |
radius | number | The radius of the search, in meters. |
maxItems | number | The 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
Name | Type | Description |
---|---|---|
index | number | Thex index of the item to get. |
Returns
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
Name | Type | Description |
---|---|---|
sub | HandlerSubscription <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
Name | Type | Description |
---|---|---|
index | number | The index that was changed. |
type | SubscribableArrayEventType | The 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
Name | Type |
---|---|
results | NearestSearchResults <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
Name | Type | Description |
---|---|---|
sub | HandlerSubscription <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
Name | Type | Description |
---|---|---|
key | string | The 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
Name | Type | Description |
---|---|---|
filter | undefined | (facility : VorFacility ) => boolean | A 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
Name | Type | Description |
---|---|---|
classMask | number | A bitmask to determine which JS VOR classes to show. |
typeMask | number | A 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
Name | Type | Default value |
---|---|---|
handler | SubscribableArrayHandler <VorFacility > | undefined |
initialNotify | boolean | false |
paused | boolean | false |
Returns
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
Name | Type | Description |
---|---|---|
index | number | The 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
Name | Type |
---|---|
handler | SubscribableArrayHandler <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
Name | Type |
---|---|
lat | number |
lon | number |
radius | number |
maxItems | number |
Returns
Promise
<void
>
Inherit Doc
Inherited from
NearestWaypointSubscription.update
Defined in
src/sdk/navigation/NearestSubscription.ts:130