Skip to main content

Class: MapOwnAirplaneLayer<M>

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:49

A layer which draws an own airplane icon. The icon is positioned at the projected location of the airplane and is rotated to match the airplane's heading.

Extends

Type Parameters

Type ParameterDefault type
M extends MapOwnAirplaneLayerModulesMapOwnAirplaneLayerModules

Constructors

Constructor

new MapOwnAirplaneLayer<M>(props): MapOwnAirplaneLayer<M>

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

Creates an instance of a DisplayComponent.

Parameters

ParameterTypeDescription
propsMapOwnAirplaneLayerPropsThe propertis of the component.

Returns

MapOwnAirplaneLayer<M>

Inherited from

MapLayer.constructor

Properties

context?

optional context: [] = undefined

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

The context on this component, if any.

Inherited from

MapLayer.context


contextType?

readonly optional contextType: readonly [] = undefined

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

The type of context for this component, if any.

Inherited from

MapLayer.contextType


headingSub?

protected optional headingSub: Subscription

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:92


iconAnchor

protected readonly iconAnchor: Subscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:71


iconAnchorSub?

protected optional iconAnchorSub: Subscription

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:96


iconOffset

protected readonly iconOffset: Float64Array

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:73


iconSize

protected readonly iconSize: Subscribable<number>

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:70


iconSizeSub?

protected optional iconSizeSub: Subscription

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


iconTransform

protected readonly iconTransform: CssTransformChain<[CssTranslate3dTransform, CssRotateTransform]>

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:76


imageFilePath

protected readonly imageFilePath: string | MappedSubscribable<string>

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:52


isGsAboveTrackThreshold

protected readonly isGsAboveTrackThreshold: MappedSubscribable<boolean>

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:81


isInsideVisibilityBounds

protected isInsideVisibilityBounds: boolean = true

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:84


needUpdatePositionRotation

protected needUpdatePositionRotation: boolean = false

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:88


needUpdateVisibility

protected needUpdateVisibility: boolean = false

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:87


orientationSub?

protected optional orientationSub: Subscription

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:97


ownAirplaneIconModule

protected readonly ownAirplaneIconModule: M["ownAirplaneIcon"]

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:68


ownAirplanePropsModule

protected readonly ownAirplanePropsModule: M["ownAirplaneProps"]

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:67


planeRotation

protected planeRotation: number = 0

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:85


positionSub?

protected optional positionSub: Subscription

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:91


props

props: MapOwnAirplaneLayerProps<M> & ComponentProps

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

The properties of the component.

Inherited from

MapLayer.props


showIcon

protected showIcon: boolean = true

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:83


showSub?

protected optional showSub: Subscription

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:90


style

protected readonly style: ObjectSubject<{ display: string; height: string; left: string; position: string; top: string; transform: string; transform-origin: string; width: string; }>

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:56


trackSub?

protected optional trackSub: Subscription

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:93


trackThresholdSub?

protected optional trackThresholdSub: Subscription

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:94


visibilityBounds

protected readonly visibilityBounds: Float64Array

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:74


vec2Cache

protected readonly static vec2Cache: Float64Array[]

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:50

Methods

destroy()

destroy(): void

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

Destroys this component.

Returns

void

Overrides

MapLayer.destroy


getContext()

protected getContext(context): never

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

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:87

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/MapOwnAirplaneLayer.tsx:107

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:80

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/MapOwnAirplaneLayer.tsx:221

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/map/MapLayer.ts:81

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

Returns

void

Inherited from

MapLayer.onSleep


onUpdated()

onUpdated(time, elapsed): void

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:231

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/layers/MapOwnAirplaneLayer.tsx:101

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

Parameters

ParameterTypeDescription
isVisiblebooleanWhether the layer is now visible.

Returns

void

Overrides

MapLayer.onVisibilityChanged


onWake()

onWake(): void

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

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

Returns

void

Inherited from

MapLayer.onWake


render()

render(): VNode

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:280

Renders the component.

Returns

VNode

A JSX element to be rendered.

Overrides

MapLayer.render


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


updateIconPositionRotation()

protected updateIconPositionRotation(): void

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:252

Updates the airplane icon's projected position and rotation.

Returns

void


updateIconVisibility()

protected updateIconVisibility(): void

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:245

Updates the airplane icon's visibility.

Returns

void


updateOffset()

protected updateOffset(): void

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:177

Updates the icon's offset from the projected position of the airplane.

Returns

void


updateVisibilityBounds()

protected updateVisibilityBounds(): void

Defined in: src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:194

Updates the boundaries within the map's projected window that define a region such that if the airplane's projected position falls outside of it, the icon is not visible and therefore does not need to be updated.

Returns

void