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
Name | Type |
---|---|
M | extends MapOwnAirplaneLayerModules = MapOwnAirplaneLayerModules |
Hierarchy
MapLayer
<MapOwnAirplaneLayerProps
<M
>>↳
MapOwnAirplaneLayer
Constructors
constructor
• new MapOwnAirplaneLayer<M
>(props
): MapOwnAirplaneLayer
<M
>
Creates an instance of a DisplayComponent.
Type parameters
Name | Type |
---|---|
M | extends MapOwnAirplaneLayerModules = MapOwnAirplaneLayerModules |
Parameters
Name | Type | Description |
---|---|---|
props | MapOwnAirplaneLayerProps <M > | The propertis of the component. |
Returns
Inherited from
Defined in
src/sdk/components/FSComponent.ts:73
Properties
context
• Optional
context: [] = undefined
The context on this component, if any.
Inherited from
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
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
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
Defined in
src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:287
getContext
▸ getContext(context
): never
Gets a context data subscription from the context collection.
Parameters
Name | Type | Description |
---|---|---|
context | never | The 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
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
Defined in
src/sdk/components/map/MapLayer.ts:38
onAfterRender
▸ onAfterRender(node
): void
A callback that is called after the component is rendered.
Parameters
Name | Type | Description |
---|---|---|
node | VNode | The component's VNode. |
Returns
void
Inherited from
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
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
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
Defined in
src/sdk/components/map/MapLayer.ts:108
onMapProjectionChanged
▸ onMapProjectionChanged(mapProjection
, changeFlags
): void
This method is called when the map projection changes.
Parameters
Name | Type | Description |
---|---|---|
mapProjection | MapProjection | this layer's map projection. |
changeFlags | number | The 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
Defined in
src/sdk/components/map/MapLayer.ts:81
onUpdated
▸ onUpdated(time
, elapsed
): void
This method is called once every map update cycle.
Parameters
Name | Type | Description |
---|---|---|
time | number | The current time as a UNIX timestamp. |
elapsed | number | The elapsed time, in milliseconds, since the last update. |
Returns
void
Overrides
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
Name | Type | Description |
---|---|---|
isVisible | boolean | Whether the layer is now visible. |
Returns
void
Overrides
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
Defined in
src/sdk/components/map/MapLayer.ts:74
render
▸ render(): VNode
Renders the component.
Returns
A JSX element to be rendered.
Overrides
Defined in
src/sdk/components/map/layers/MapOwnAirplaneLayer.tsx:280
setVisible
▸ setVisible(val
): void
Sets this layer's visibility.
Parameters
Name | Type | Description |
---|---|---|
val | boolean | Whether this layer should be visible. |
Returns
void
Inherited from
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