Skip to main content

Class: MapSystemSharedFlightPlanLayer

Defined in: src/sdk/components/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:114

A map layer that draws zero or more flight plans. The layer draws the flight paths of the flight plans to a shared canvas. Flight plan waypoints associated with the plans are registered with a waypoint renderer. Importantly however, the layer does not by itself display any rendered waypoints; the waypoint renderer must be set up to render the flight plan waypoints to a separate layer.

Extends​

Constructors​

Constructor​

new MapSystemSharedFlightPlanLayer(props): MapSystemSharedFlightPlanLayer

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

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsMapSystemSharedFlightPlanLayerPropsThe propertis of the component.

Returns​

MapSystemSharedFlightPlanLayer

Inherited from​

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: MapSystemSharedFlightPlanLayerProps & 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/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:217

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


isFlightPlanVisible()​

isFlightPlanVisible(planIndex): boolean

Defined in: src/sdk/components/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:137

Gets whether a flight plan rendered by this layer is set to be visible. If this layer as a whole is not visible (as set by setVisible()), then none of the flight plans rendered by this layer will be visible, regardless of the value returned by this method.

Parameters​

ParameterTypeDescription
planIndexnumberThe index of the flight plan for which to get the visibility state.

Returns​

boolean

Whether the specified flight plan is set to be visible, or false if the flight plan is not rendered by this layer.


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/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:154

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/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:171

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


onSleep()​

onSleep(): void

Defined in: src/sdk/components/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:166

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/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:176

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/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:161

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

Returns​

void

Overrides​

MapLayer.onWake


render()​

render(): VNode

Defined in: src/sdk/components/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:181

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Overrides​

MapLayer.render


setFlightPlanVisible()​

setFlightPlanVisible(planIndex, val): void

Defined in: src/sdk/components/mapsystem/layers/MapSystemSharedFlightPlanLayer.tsx:149

Sets the visibility of a flight plan rendered by this layer. If this layer as a whole is not visible (as set by setVisible()), then none of the flight plans rendered by this layer will be visible, regardless of the individual flight plan visibilities set by this method.

Parameters​

ParameterTypeDescription
planIndexnumberThe index of the flight plan for which to set visibility. Attempting to set the visibility of a plan that is not rendered by this layer will have no effect.
valbooleanWhether the flight plan should be visible.

Returns​

void


setVisible()​

setVisible(val): void

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

Sets this layer's visibility.

Parameters​

ParameterTypeDescription
valbooleanWhether this layer should be visible.

Returns​

void

Inherited from​

MapLayer.setVisible