Skip to main content

Class: MapNearestWaypointsLayer<R, P>

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:95

An abstract implementation of a map layer which displays waypoints (airports, navaids, and intersections) within a search radius.

Extends​

Type Parameters​

Type ParameterDefault type
R extends MapWaypointRenderer<any>MapWaypointRenderer
P extends MapAbstractNearestWaypointsLayerProps<R>MapAbstractNearestWaypointsLayerProps<R>

Constructors​

Constructor​

new MapNearestWaypointsLayer<R, P>(props): MapNearestWaypointsLayer<R, P>

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:143

Creates a new instance of MapNearestWaypointsLayer.

Parameters​

ParameterTypeDescription
propsPThe properties of the component.

Returns​

MapNearestWaypointsLayer<R, P>

Overrides​

MapLayer.constructor

Properties​

context?​

optional context: [] = undefined

Defined in: src/sdk/components/FSComponent.ts:67

The context on this component, if any.

Inherited from​

MapLayer.context


contextType?​

readonly optional contextType: readonly [] = undefined

Defined in: src/sdk/components/FSComponent.ts:70

The type of context for this component, if any.

Inherited from​

MapLayer.contextType


props​

props: P & ComponentProps

Defined in: src/sdk/components/FSComponent.ts:64

The properties of the component.

Inherited from​

MapLayer.props

Methods​

destroy()​

destroy(): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:581

Destroys this component.

Returns​

void

Overrides​

MapLayer.destroy


getContext()​

protected getContext(context): never

Defined in: src/sdk/components/FSComponent.ts:109

Gets a context data subscription from the context collection.

Parameters​

ParameterTypeDescription
contextneverThe context to get the subscription for.

Returns​

never

The requested context.

Throws​

An error if no data for the specified context type could be found.

Inherited from​

MapLayer.getContext


isVisible()​

isVisible(): boolean

Defined in: src/sdk/components/map/MapLayer.ts:38

Checks whether this layer is visible.

Returns​

boolean

whether this layer is visible.

Inherited from​

MapLayer.isVisible


onAfterRender()​

onAfterRender(node): void

Defined in: src/sdk/components/FSComponent.ts:90

A callback that is called after the component is rendered.

Parameters​

ParameterTypeDescription
nodeVNodeThe component's VNode.

Returns​

void

Inherited from​

MapLayer.onAfterRender


onAttached()​

onAttached(): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:237

This method is called when this layer is attached to its parent map component.

Returns​

void

Overrides​

MapLayer.onAttached


onBeforeRender()​

onBeforeRender(): void

Defined in: src/sdk/components/FSComponent.ts:83

A callback that is called before the component is rendered.

Returns​

void

Inherited from​

MapLayer.onBeforeRender


onDetached()​

onDetached(): void

Defined in: src/sdk/components/map/MapLayer.ts:108

This method is called when this layer is detached from its parent map component.

Returns​

void

Inherited from​

MapLayer.onDetached


onMapProjectionChanged()​

onMapProjectionChanged(mapProjection, changeFlags): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:292

This method is called when the map projection changes.

Parameters​

ParameterTypeDescription
mapProjectionMapProjectionthis layer's map projection.
changeFlagsnumberThe types of changes made to the projection.

Returns​

void

Overrides​

MapLayer.onMapProjectionChanged


onSessionsStarted()​

protected onSessionsStarted(airportSession, vorSession, ndbSession, intSession, userSession): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:180

A callback called when the nearest facility search sessions have been started.

Parameters​

ParameterTypeDescription
airportSessionNearestAirportSearchSession<Struct>The airport search session.
vorSessionNearestVorSearchSession<Struct>The VOR search session.
ndbSessionNearestIcaoSearchSession<Struct>The NDB search session.
intSessionNearestIntersectionSearchSession<Struct>The intersection search session.
userSessionNearestRepoFacilitySearchSession<USR, Struct>The user facility search session.

Returns​

void


onSleep()​

onSleep(): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:287

This method is called when this layer's parent map is put to sleep.

Returns​

void

Overrides​

MapLayer.onSleep


onUpdated()​

onUpdated(time, elapsed): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:316

This method is called once every map update cycle.

Parameters​

ParameterTypeDescription
timenumberThe current time as a UNIX timestamp.
elapsednumberThe elapsed time, in milliseconds, since the last update.

Returns​

void

Overrides​

MapLayer.onUpdated


onVisibilityChanged()​

onVisibilityChanged(isVisible): void

Defined in: src/sdk/components/map/MapLayer.ts:60

This method is called when this layer's visibility changes.

Parameters​

ParameterTypeDescription
isVisiblebooleanWhether the layer is now visible.

Returns​

void

Inherited from​

MapLayer.onVisibilityChanged


onWake()​

onWake(): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:282

This method is called when this layer's parent map is woken.

Returns​

void

Overrides​

MapLayer.onWake


refreshWaypoints()​

refreshWaypoints(): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:271

Forces a refresh of all the waypoints.

Returns​

void


render()​

render(): VNode

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:568

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Overrides​

MapLayer.render


setVisible()​

setVisible(val): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:562

Sets this layer's visibility.

Parameters​

ParameterTypeDescription
valbooleanWhether this layer should be visible.

Returns​

void

Overrides​

MapLayer.setVisible


tryRefreshAllSearches()​

tryRefreshAllSearches(center?, radius?, force?): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:355

Attempts to refresh all of the nearest facility searches. Searches will only be refreshed if the desired search radius is different from the last refreshed search radius or the desired search center is outside of the margin of the last refreshed search center.

Parameters​

ParameterTypeDescription
center?Readonly<LatLonInterface>The center of the search area. Defaults to this layer's automatically calculated search center.
radius?numberThe radius of the search area, in great-arc radians. Defaults to this layer's automatically calculated search radius.
force?booleanWhether to force a refresh of all waypoints. Defaults to false.

Returns​

void


tryRefreshSearch()​

tryRefreshSearch(type, center?, radius?, force?): void

Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:372

Attempts to refresh a nearest search. The search will only be refreshed if the desired search radius is different from the last refreshed search radius or the desired search center is outside of the margin of the last refreshed search center.

Parameters​

ParameterTypeDescription
typeMapNearestWaypointsLayerSearchTypesThe type of nearest search to refresh.
center?Readonly<LatLonInterface>The center of the search area. Defaults to this layer's automatically calculated search center.
radius?numberThe radius of the search area, in great-arc radians. Defaults to this layer's automatically calculated search radius.
force?booleanWhether to force a refresh of all waypoints. Defaults to false.

Returns​

void