Skip to main content

Class: MapOwnAirplaneLayer<M>

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.

Type parameters

NameType
Mextends MapOwnAirplaneLayerModules = MapOwnAirplaneLayerModules

Hierarchy

Constructors

constructor

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

Creates an instance of a DisplayComponent.

Type parameters

NameType
Mextends MapOwnAirplaneLayerModules = MapOwnAirplaneLayerModules

Parameters

NameTypeDescription
propsMapOwnAirplaneLayerProps<M>The propertis of the component.

Returns

MapOwnAirplaneLayer<M>

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


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

The properties of the component.

Inherited from

MapLayer.props

Defined in

src/sdk/components/FSComponent.ts:61


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 = '0px'; left: string = '0px'; position: string = 'absolute'; top: string = '0px'; transform: string = 'translate3d(0, 0, 0) rotate(0deg)'; transform-origin: string = '50% 50%'; width: string = '0px' }>

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

Static Protected Readonly vec2Cache: Float64Array[]

Defined in

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

Methods

destroy

destroy(): void

Destroys this component.

Returns

void

Overrides

MapLayer.destroy

Defined in

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


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


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


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


onVisibilityChanged

onVisibilityChanged(isVisible): void

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

Parameters

NameTypeDescription
isVisiblebooleanWhether the layer is now visible.

Returns

void

Overrides

MapLayer.onVisibilityChanged

Defined in

src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:101


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


render

render(): VNode

Renders the component.

Returns

VNode

A JSX element to be rendered.

Overrides

MapLayer.render

Defined in

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


setVisible

setVisible(val): void

Sets this layer's visibility.

Parameters

NameTypeDescription
valbooleanWhether this layer should be visible.

Returns

void

Inherited from

MapLayer.setVisible

Defined in

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


updateIconPositionRotation

updateIconPositionRotation(): void

Updates the airplane icon's projected position and rotation.

Returns

void

Defined in

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


updateIconVisibility

updateIconVisibility(): void

Updates the airplane icon's visibility.

Returns

void

Defined in

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


updateOffset

updateOffset(): void

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

Returns

void

Defined in

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


updateVisibilityBounds

updateVisibilityBounds(): void

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

Defined in

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