Skip to main content

Class: MapNearestWaypointsLayer<R, P>

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

Type parameters

NameType
Rextends MapWaypointRenderer<any> = MapWaypointRenderer
Pextends MapAbstractNearestWaypointsLayerProps<R> = MapAbstractNearestWaypointsLayerProps<R>

Hierarchy

Constructors

constructor

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

Creates an instance of a DisplayComponent.

Type parameters

NameType
Rextends MapWaypointRenderer<any> = MapWaypointRenderer<MapWaypoint>
Pextends MapAbstractNearestWaypointsLayerProps<R> = MapAbstractNearestWaypointsLayerProps<R>

Parameters

NameTypeDescription
propsPThe propertis of the component.

Returns

MapNearestWaypointsLayer<R, P>

Inherited from

MapLayer.constructor

Defined in

src/sdk/components/FSComponent.ts:73

Properties

context

Optional context: [] = undefined

The context on this component, if any.

Inherited from

MapLayer.context

Defined in

src/sdk/components/FSComponent.ts:64


contextType

Optional Readonly contextType: readonly [] = undefined

The type of context for this component, if any.

Inherited from

MapLayer.contextType

Defined in

src/sdk/components/FSComponent.ts:67


props

props: P & ComponentProps

The properties of the component.

Inherited from

MapLayer.props

Defined in

src/sdk/components/FSComponent.ts:61

Methods

destroy

destroy(): void

Destroys this component.

Returns

void

Overrides

MapLayer.destroy

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:506


getContext

getContext(context): never

Gets a context data subscription from the context collection.

Parameters

NameTypeDescription
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

Defined in

src/sdk/components/FSComponent.ts:106


isVisible

isVisible(): boolean

Checks whether this layer is visible.

Returns

boolean

whether this layer is visible.

Inherited from

MapLayer.isVisible

Defined in

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


onAfterRender

onAfterRender(node): void

A callback that is called after the component is rendered.

Parameters

NameTypeDescription
nodeVNodeThe component's VNode.

Returns

void

Inherited from

MapLayer.onAfterRender

Defined in

src/sdk/components/FSComponent.ts:87


onAttached

onAttached(): void

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

Returns

void

Overrides

MapLayer.onAttached

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:185


onBeforeRender

onBeforeRender(): void

A callback that is called before the component is rendered.

Returns

void

Inherited from

MapLayer.onBeforeRender

Defined in

src/sdk/components/FSComponent.ts:80


onDetached

onDetached(): void

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

Returns

void

Inherited from

MapLayer.onDetached

Defined in

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


onMapProjectionChanged

onMapProjectionChanged(mapProjection, changeFlags): void

This method is called when the map projection changes.

Parameters

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

Returns

void

Overrides

MapLayer.onMapProjectionChanged

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:230


onSessionsStarted

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

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

Parameters

NameTypeDescription
airportSessionNearestAirportSearchSessionThe airport search session.
vorSessionNearestVorSearchSessionThe VOR search session.
ndbSessionNearestSearchSession<string, string>The NDB search session.
intSessionNearestIntersectionSearchSessionThe intersection search session.
userSessionNearestRepoFacilitySearchSession<UserFacility>The user facility search session.

Returns

void

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:144


onSleep

onSleep(): void

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

Returns

void

Inherited from

MapLayer.onSleep

Defined in

src/sdk/components/map/MapLayer.ts:81


onUpdated

onUpdated(time, elapsed): void

This method is called once every map update cycle.

Parameters

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

Returns

void

Overrides

MapLayer.onUpdated

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:254


onVisibilityChanged

onVisibilityChanged(isVisible): void

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

Parameters

NameTypeDescription
isVisiblebooleanWhether the layer is now visible.

Returns

void

Inherited from

MapLayer.onVisibilityChanged

Defined in

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


onWake

onWake(): void

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

Returns

void

Inherited from

MapLayer.onWake

Defined in

src/sdk/components/map/MapLayer.ts:74


refreshWaypoints

refreshWaypoints(): void

Forces a refresh of all the waypoints.

Returns

void

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:219


render

render(): VNode

Renders the component.

Returns

VNode

A JSX element to be rendered.

Overrides

MapLayer.render

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:499


setVisible

setVisible(val): void

Sets this layer's visibility.

Parameters

NameTypeDescription
valbooleanWhether this layer should be visible.

Returns

void

Overrides

MapLayer.setVisible

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:493


tryRefreshAllSearches

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

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

NameTypeDescription
center?LatLonInterfaceThe 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

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:293


tryRefreshSearch

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

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

NameTypeDescription
typeMapNearestWaypointsLayerSearchTypesThe type of nearest search to refresh.
center?LatLonInterfaceThe 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

Defined in

src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:310