Class: NearestVorSubscription
Defined in: src/sdk/navigation/NearestSubscription.ts:465
A nearest search subscription for VOR facilites.
Extends
NearestWaypointSubscription<VorFacility>
Constructors
Constructor
new NearestVorSubscription(
facilityLoader):NearestVorSubscription
Defined in: src/sdk/navigation/NearestSubscription.ts:470
Creates a new NearestVorSubscription.
Parameters
| Parameter | Type | Description |
|---|---|---|
facilityLoader | FacilityLoader | The facility loader to use with this instance. |
Returns
NearestVorSubscription
Overrides
NearestWaypointSubscription<VorFacility>.constructor
Properties
facilities
protectedreadonlyfacilities:VorFacility[] =[]
Defined in: src/sdk/navigation/NearestSubscription.ts:58
Inherited from
NearestWaypointSubscription.facilities
facilityCache
protectedreadonlyfacilityCache:Map<string,VorFacility>
Defined in: src/sdk/navigation/NearestSubscription.ts:210
Inherited from
NearestWaypointSubscription.facilityCache
facilityIndex
protectedreadonlyfacilityIndex:Map<string,VorFacility>
Defined in: src/sdk/navigation/NearestSubscription.ts:59
Inherited from
NearestWaypointSubscription.facilityIndex
facilityLoader
protectedreadonlyfacilityLoader:FacilityLoader
Defined in: src/sdk/navigation/NearestSubscription.ts:75
An instance of the facility loader to search with.
Inherited from
NearestWaypointSubscription.facilityLoader
filterCb()?
protectedoptionalfilterCb: (facility) =>boolean
Defined in: src/sdk/navigation/NearestSubscription.ts:209
Parameters
| Parameter | Type |
|---|---|
facility | VorFacility |
Returns
boolean
Inherited from
NearestWaypointSubscription.filterCb
initialNotifyFunc()
protectedreadonlyinitialNotifyFunc: (sub) =>void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:20
A function which sends initial notifications to subscriptions.
Notifies a subscription of this array's current state.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<VorFacility>> | The subscription to notify. |
Returns
void
Inherited from
NearestWaypointSubscription.initialNotifyFunc
notifyDepth
protectednotifyDepth:number=0
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:17
Inherited from
NearestWaypointSubscription.notifyDepth
onSubDestroyedFunc()
protectedreadonlyonSubDestroyedFunc: (sub) =>void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:23
A function which responds to when a subscription to this subscribable is destroyed.
Responds to when a subscription to this array is destroyed.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<VorFacility>> | The destroyed subscription. |
Returns
void
Inherited from
NearestWaypointSubscription.onSubDestroyedFunc
session
protectedsession:undefined|NearestSearchSession<string,string>
Defined in: src/sdk/navigation/NearestSubscription.ts:61
Inherited from
NearestWaypointSubscription.session
singletonSub?
protectedoptionalsingletonSub:HandlerSubscription<SubscribableArrayHandler<VorFacility>>
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:14
Inherited from
NearestWaypointSubscription.singletonSub
startPromiseResolves
protectedreadonlystartPromiseResolves: () =>void[] =[]
Defined in: src/sdk/navigation/NearestSubscription.ts:63
Returns
void
Inherited from
NearestWaypointSubscription.startPromiseResolves
subs?
protectedoptionalsubs:HandlerSubscription<SubscribableArrayHandler<VorFacility>>[]
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:16
Inherited from
NearestWaypointSubscription.subs
type
protectedreadonlytype:FacilitySearchType
Defined in: src/sdk/navigation/NearestSubscription.ts:75
The type of facility to search for.
Inherited from
NearestWaypointSubscription.type
updatePromiseResolves
protectedreadonlyupdatePromiseResolves: () =>void[] =[]
Defined in: src/sdk/navigation/NearestSubscription.ts:64
Returns
void
Inherited from
NearestWaypointSubscription.updatePromiseResolves
Accessors
length
Get Signature
get length():
number
Defined in: src/sdk/navigation/NearestSubscription.ts:80
Inherit Doc
Returns
number
Inherited from
NearestWaypointSubscription.length
started
Get Signature
get started():
boolean
Defined in: src/sdk/navigation/NearestSubscription.ts:88
Whether or not this subscription has been started.
Returns
boolean
True if started, false otherwise.
Inherited from
NearestWaypointSubscription.started
Methods
addFacility()
protectedaddFacility(facility,key):void
Defined in: src/sdk/navigation/NearestSubscription.ts:176
Adds a facility to the collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | VorFacility | The facility to add. |
key | string | The key to track this facility by. |
Returns
void
Inherited from
NearestWaypointSubscription.addFacility
addSubscription()
protectedaddSubscription(sub):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:29
Adds a subscription to this array.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<VorFacility>> | The subscription to add. |
Returns
void
Inherited from
NearestWaypointSubscription.addSubscription
awaitStart()
awaitStart():
Promise<void>
Defined in: src/sdk/navigation/NearestSubscription.ts:98
Returns
Promise<void>
Inherit Doc
Inherited from
NearestWaypointSubscription.awaitStart
doUpdate()
protecteddoUpdate(lat,lon,radius,maxItems):Promise<void>
Defined in: src/sdk/navigation/NearestSubscription.ts:149
Executes an update of the nearest search subscription.
Parameters
| Parameter | 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
get()
get(
index):VorFacility
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:77
Gets an item from the array.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | number | Thex index of the item to get. |
Returns
An item.
Throws
Inherited from
NearestWaypointSubscription.get
getArray()
getArray(): readonly
VorFacility[]
Defined in: src/sdk/navigation/NearestSubscription.ts:93
Returns
readonly VorFacility[]
Inherit Doc
Inherited from
NearestWaypointSubscription.getArray
initialNotify()
protectedinitialNotify(sub):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:176
Notifies a subscription of this array's current state.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<VorFacility>> | The subscription to notify. |
Returns
void
Inherited from
NearestWaypointSubscription.initialNotify
notify()
protectednotify(index,type,modifiedItem?):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:100
Notifies subscriptions of a change in the array.
Parameters
| Parameter | 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
onResults()
protectedonResults(results):Promise<void>
Defined in: src/sdk/navigation/NearestSubscription.ts:259
Parameters
| Parameter | Type |
|---|---|
results | NearestSearchResults<string, string> |
Returns
Promise<void>
Inherit Doc
Inherited from
NearestWaypointSubscription.onResults
onSubDestroyed()
protectedonSubDestroyed(sub):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:185
Responds to when a subscription to this array is destroyed.
Parameters
| Parameter | Type | Description |
|---|---|---|
sub | HandlerSubscription<SubscribableArrayHandler<VorFacility>> | The destroyed subscription. |
Returns
void
Inherited from
NearestWaypointSubscription.onSubDestroyed
refilter()
protectedrefilter():void
Defined in: src/sdk/navigation/NearestSubscription.ts:238
Refilters the latest search results returned from this subscription's nearest search session.
Returns
void
Inherited from
NearestWaypointSubscription.refilter
removeFacility()
protectedremoveFacility(key):void
Defined in: src/sdk/navigation/NearestSubscription.ts:191
Removes a facility from the collection.
Parameters
| Parameter | Type | Description |
|---|---|---|
key | string | The key of the facility to remove. |
Returns
void
Inherited from
NearestWaypointSubscription.removeFacility
setFilterCb()
setFilterCb(
filter):void
Defined in: src/sdk/navigation/NearestSubscription.ts:230
Sets this subscription's post-search session filter and refilters this subscription's latest results using the new filter.
Parameters
| Parameter | Type | Description |
|---|---|---|
filter | undefined | (facility) => 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
setVorFilter()
setVorFilter(
classMask,typeMask):void
Defined in: src/sdk/navigation/NearestSubscription.ts:479
Sets the VOR search filter.
Parameters
| Parameter | 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
start()
start():
Promise<void>
Defined in: src/sdk/navigation/NearestSubscription.ts:107
Returns
Promise<void>
Inherit Doc
Inherited from
NearestWaypointSubscription.start
sub()
sub(
handler,initialNotify,paused):Subscription
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:41
Parameters
| Parameter | Type | Default value |
|---|---|---|
handler | SubscribableArrayHandler<VorFacility> | undefined |
initialNotify | boolean | false |
paused | boolean | false |
Returns
Inherit Doc
Inherited from
NearestWaypointSubscription.sub
tryGet()
tryGet(
index):undefined|VorFacility
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:90
Tries to get the value from the array.
Parameters
| Parameter | 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
unsub()
unsub(
handler):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:56
Parameters
| Parameter | Type |
|---|---|
handler | SubscribableArrayHandler<VorFacility> |
Returns
void
Inherit Doc
Inherited from
NearestWaypointSubscription.unsub
update()
update(
lat,lon,radius,maxItems):Promise<void>
Defined in: src/sdk/navigation/NearestSubscription.ts:130
Parameters
| Parameter | Type |
|---|---|
lat | number |
lon | number |
radius | number |
maxItems | number |
Returns
Promise<void>
Inherit Doc
Inherited from
NearestWaypointSubscription.update