Class: NearestAirportSubscription
Defined in: src/sdk/navigation/NearestSubscription.ts:342
A nearest search subscription for airport facilites.
Extends
NearestWaypointSubscription
<AirportFacility
>
Constructors
Constructor
new NearestAirportSubscription(
facilityLoader
,filterCb?
):NearestAirportSubscription
Defined in: src/sdk/navigation/NearestSubscription.ts:352
Creates a new instance of NearestAirportSubscription.
Parameters
Parameter | Type | Description |
---|---|---|
facilityLoader | FacilityLoader | The facility loader to use with this instance. |
filterCb? | (facility ) => boolean | A function which filters results after they have been returned by this subscription's search session. If not defined, no post-search session filtering will be performed. |
Returns
NearestAirportSubscription
Overrides
NearestWaypointSubscription<AirportFacility>.constructor
Properties
dataFlags
protected
dataFlags:AirportFacilityDataFlags
=AirportFacilityDataFlags.All
Defined in: src/sdk/navigation/NearestSubscription.ts:343
facilities
protected
readonly
facilities:AirportFacility
[] =[]
Defined in: src/sdk/navigation/NearestSubscription.ts:70
Inherited from
NearestWaypointSubscription.facilities
facilityCache
protected
readonly
facilityCache:Map
<string
,AirportFacility
>
Defined in: src/sdk/navigation/NearestSubscription.ts:237
Inherited from
NearestWaypointSubscription.facilityCache
facilityClient
protected
readonly
facilityClient:FacilityClient
Defined in: src/sdk/navigation/NearestSubscription.ts:88
The client from which to retrieve facilities.
Inherited from
NearestWaypointSubscription.facilityClient
facilityIndex
protected
readonly
facilityIndex:Map
<string
,AirportFacility
>
Defined in: src/sdk/navigation/NearestSubscription.ts:71
Inherited from
NearestWaypointSubscription.facilityIndex
facilityType
protected
readonly
facilityType:undefined
|FacilityType
Defined in: src/sdk/navigation/NearestSubscription.ts:232
Inherited from
NearestWaypointSubscription.facilityType
filterCb()?
protected
optional
filterCb: (facility
) =>boolean
Defined in: src/sdk/navigation/NearestSubscription.ts:236
Parameters
Parameter | Type |
---|---|
facility | AirportFacility |
Returns
boolean
Inherited from
NearestWaypointSubscription.filterCb
icaos
protected
readonly
icaos:Map
<string
,IcaoValue
>
Defined in: src/sdk/navigation/NearestSubscription.ts:234
Inherited from
NearestWaypointSubscription.icaos
initialNotifyFunc()
protected
readonly
initialNotifyFunc: (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 <AirportFacility >> | The subscription to notify. |
Returns
void
Inherited from
NearestWaypointSubscription.initialNotifyFunc
notifyDepth
protected
notifyDepth:number
=0
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:17
Inherited from
NearestWaypointSubscription.notifyDepth
onSubDestroyedFunc()
protected
readonly
onSubDestroyedFunc: (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 <AirportFacility >> | The destroyed subscription. |
Returns
void
Inherited from
NearestWaypointSubscription.onSubDestroyedFunc
pendingDataFlags
protected
pendingDataFlags:AirportFacilityDataFlags
Defined in: src/sdk/navigation/NearestSubscription.ts:344
session
protected
session:undefined
|NearestSearchSession
<IcaoValue
,IcaoValue
>
Defined in: src/sdk/navigation/NearestSubscription.ts:73
Inherited from
NearestWaypointSubscription.session
singletonSub?
protected
optional
singletonSub:HandlerSubscription
<SubscribableArrayHandler
<AirportFacility
>>
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:14
Inherited from
NearestWaypointSubscription.singletonSub
startPromiseResolves
protected
readonly
startPromiseResolves: () =>void
[] =[]
Defined in: src/sdk/navigation/NearestSubscription.ts:75
Returns
void
Inherited from
NearestWaypointSubscription.startPromiseResolves
subs?
protected
optional
subs:HandlerSubscription
<SubscribableArrayHandler
<AirportFacility
>>[]
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:16
Inherited from
NearestWaypointSubscription.subs
type
protected
readonly
type:All
|Airport
|Intersection
|Vor
|Ndb
|User
|Visual
|AllExceptVisual
Defined in: src/sdk/navigation/NearestSubscription.ts:89
The type of facility to search for.
Inherited from
NearestWaypointSubscription.type
updatePromiseResolves
protected
readonly
updatePromiseResolves: () =>void
[] =[]
Defined in: src/sdk/navigation/NearestSubscription.ts:76
Returns
void
Inherited from
NearestWaypointSubscription.updatePromiseResolves
Accessors
length
Get Signature
get length():
number
Defined in: src/sdk/navigation/NearestSubscription.ts:95
Inherit Doc
Returns
number
Inherited from
NearestWaypointSubscription.length
started
Get Signature
get started():
boolean
Defined in: src/sdk/navigation/NearestSubscription.ts:103
Whether or not this subscription has been started.
Returns
boolean
True if started, false otherwise.
Inherited from
NearestWaypointSubscription.started
Methods
addFacility()
protected
addFacility(facility
,key
):void
Defined in: src/sdk/navigation/NearestSubscription.ts:198
Adds a facility to the collection.
Parameters
Parameter | Type | Description |
---|---|---|
facility | AirportFacility | The facility to add. |
key | string | The key to track this facility by. |
Returns
void
Inherited from
NearestWaypointSubscription.addFacility
addSubscription()
protected
addSubscription(sub
):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:29
Adds a subscription to this array.
Parameters
Parameter | Type | Description |
---|---|---|
sub | HandlerSubscription <SubscribableArrayHandler <AirportFacility >> | The subscription to add. |
Returns
void
Inherited from
NearestWaypointSubscription.addSubscription
awaitStart()
awaitStart():
Promise
<void
>
Defined in: src/sdk/navigation/NearestSubscription.ts:113
Returns
Promise
<void
>
Inherit Doc
Inherited from
NearestWaypointSubscription.awaitStart
doUpdate()
protected
doUpdate(lat
,lon
,radius
,maxItems
):Promise
<void
>
Defined in: src/sdk/navigation/NearestSubscription.ts:171
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
):AirportFacility
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:64
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
AirportFacility
[]
Defined in: src/sdk/navigation/NearestSubscription.ts:108
Returns
readonly AirportFacility
[]
Inherit Doc
Inherited from
NearestWaypointSubscription.getArray
getFacilities()
protected
getFacilities(icaos
):Promise
<(null
|AirportFacility
)[]>
Defined in: src/sdk/navigation/NearestSubscription.ts:433
Parameters
Parameter | Type |
---|---|
icaos | readonly IcaoValue [] |
Returns
Promise
<(null
| AirportFacility
)[]>
Inherit Doc
Overrides
NearestWaypointSubscription.getFacilities
initialNotify()
protected
initialNotify(sub
):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:163
Notifies a subscription of this array's current state.
Parameters
Parameter | Type | Description |
---|---|---|
sub | HandlerSubscription <SubscribableArrayHandler <AirportFacility >> | The subscription to notify. |
Returns
void
Inherited from
NearestWaypointSubscription.initialNotify
notify()
protected
notify(index
,type
,modifiedItem?
):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:87
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? | AirportFacility | readonly AirportFacility [] | The item modified by the operation. |
Returns
void
Inherited from
NearestWaypointSubscription.notify
onResults()
protected
onResults(results
):Promise
<void
>
Defined in: src/sdk/navigation/NearestSubscription.ts:392
Parameters
Parameter | Type |
---|---|
results | NearestSearchResults <IcaoValue , IcaoValue > |
Returns
Promise
<void
>
Inherit Doc
Overrides
NearestWaypointSubscription.onResults
onSubDestroyed()
protected
onSubDestroyed(sub
):void
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:172
Responds to when a subscription to this array is destroyed.
Parameters
Parameter | Type | Description |
---|---|---|
sub | HandlerSubscription <SubscribableArrayHandler <AirportFacility >> | The destroyed subscription. |
Returns
void
Inherited from
NearestWaypointSubscription.onSubDestroyed
refilter()
protected
refilter():void
Defined in: src/sdk/navigation/NearestSubscription.ts:269
Refilters the latest search results returned from this subscription's nearest search session.
Returns
void
Inherited from
NearestWaypointSubscription.refilter
removeFacility()
protected
removeFacility(key
):void
Defined in: src/sdk/navigation/NearestSubscription.ts:213
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
setDataFlags()
setDataFlags(
flags
):void
Defined in: src/sdk/navigation/NearestSubscription.ts:387
Sets the bitflags describing the data to be loaded in the airport facilities provided by this subscription. All airport facilities in this subscription's array are guaranteed to have at least as much loaded data as defined by the bitflags. Changes to the bitflags will take effect the next time this subscription's search is updated.
Parameters
Parameter | Type | Description |
---|---|---|
flags | number | The bitflags to set. |
Returns
void
setExtendedFilters()
setExtendedFilters(
surfaceTypeMask
,approachTypeMask
,toweredMask
,minRunwayLength
):void
Defined in: src/sdk/navigation/NearestSubscription.ts:374
Sets the extended airport filters for the airport nearest search.
Parameters
Parameter | Type | Description |
---|---|---|
surfaceTypeMask | number | A bitmask of allowable runway surface types. |
approachTypeMask | number | A bitmask of allowable approach types. |
toweredMask | number | A bitmask of untowered (1) or towered (2) bits. |
minRunwayLength | number | The minimum allowable runway length, in meters. |
Returns
void
setFilter()
setFilter(
showClosed
,classMask
):void
Defined in: src/sdk/navigation/NearestSubscription.ts:361
Sets the airport search filter.
Parameters
Parameter | Type | Description |
---|---|---|
showClosed | boolean | Whether or not to return closed airports in the search. |
classMask | number | A bitmask representing the classes of airports to show. |
Returns
void
setFilterCb()
setFilterCb(
filter
):void
Defined in: src/sdk/navigation/NearestSubscription.ts:261
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
start()
start():
Promise
<void
>
Defined in: src/sdk/navigation/NearestSubscription.ts:122
Returns
Promise
<void
>
Inherit Doc
Inherited from
NearestWaypointSubscription.start
startSearchSession()
protected
startSearchSession():Promise
<NearestSearchSession
<IcaoValue
,IcaoValue
>>
Defined in: src/sdk/navigation/NearestSubscription.ts:290
Returns
Promise
<NearestSearchSession
<IcaoValue
, IcaoValue
>>
Inherit Doc
Inherited from
NearestWaypointSubscription.startSearchSession
sub()
sub(
handler
,initialNotify
,paused
):Subscription
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:41
Parameters
Parameter | Type | Default value |
---|---|---|
handler | SubscribableArrayHandler <AirportFacility > | undefined |
initialNotify | boolean | false |
paused | boolean | false |
Returns
Inherit Doc
Inherited from
NearestWaypointSubscription.sub
tryGet()
tryGet(
index
):undefined
|AirportFacility
Defined in: src/sdk/sub/AbstractSubscribableArray.ts:77
Tries to get the value from the array.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index of the item to get. |
Returns
undefined
| AirportFacility
The value or undefined if not found.
Inherited from
NearestWaypointSubscription.tryGet
update()
update(
lat
,lon
,radius
,maxItems
):Promise
<void
>
Defined in: src/sdk/navigation/NearestSubscription.ts:152
Parameters
Parameter | Type |
---|---|
lat | number |
lon | number |
radius | number |
maxItems | number |
Returns
Promise
<void
>
Inherit Doc
Inherited from
NearestWaypointSubscription.update