Class: MapSystemComponent<P>
A component that encompasses the compiled map system.
Type parameters
Name | Type |
---|---|
P | extends MapSystemComponentProps <any > = MapSystemComponentProps <any > |
Hierarchy
MapComponent
<P
>↳
MapSystemComponent
Constructors
constructor
• new MapSystemComponent<P
>(props
): MapSystemComponent
<P
>
Type parameters
Name | Type |
---|---|
P | extends MapSystemComponentProps <any > = MapSystemComponentProps <any > |
Parameters
Name | Type |
---|---|
props | P |
Returns
Inherit Doc
Overrides
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:61
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
deadZone
• Protected
Readonly
deadZone: Subscribable
<Readonly
<Omit
<Float64Array
, "set"
| "sort"
| "copyWithin"
>>>
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:58
mapProjection
• Readonly
mapProjection: MapProjection
This map component's projection model.
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:42
props
• props: P
& ComponentProps
The properties of the component.
Inherited from
Defined in
src/sdk/components/FSComponent.ts:61
rootStyles
• Protected
Readonly
rootStyles: ObjectSubject
<{ height
: string
= '0px'; width
: string
= '0px' }>
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:53
Accessors
isAwake
• get
isAwake(): boolean
Whether this map is awake.
Returns
boolean
Inherited from
MapComponent.isAwake
Defined in
src/sdk/components/map/MapComponent.ts:82
Methods
attachLayer
▸ attachLayer(layer
): void
Attaches a layer to this map component. If the layer is already attached, then this method has no effect.
Parameters
Name | Type | Description |
---|---|---|
layer | MapLayer <MapLayerProps <any >> | The layer to attach. |
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:209
attachLayers
▸ attachLayers(thisNode
): void
Scans this component's VNode sub-tree for MapLayer components and attaches them when found. Only the top-most level of MapLayer components are attached; layers that are themselves children of other layers are not attached.
Parameters
Name | Type | Description |
---|---|---|
thisNode | VNode | This component's VNode. |
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:140
destroy
▸ destroy(): void
Destroys this component.
Returns
void
Overrides
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:139
detachLayer
▸ detachLayer(layer
): boolean
Detaches a layer from this map component.
Parameters
Name | Type | Description |
---|---|---|
layer | MapLayer <MapLayerProps <any >> | The layer to detach. |
Returns
boolean
Whether the layer was succesfully detached.
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:224
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
getProjectedSize
▸ getProjectedSize(): Readonly
<Omit
<Float64Array
, "set"
| "sort"
| "copyWithin"
>>
Gets the size of this map's projected window, in pixels.
Returns
Readonly
<Omit
<Float64Array
, "set"
| "sort"
| "copyWithin"
>>
The size of this map's projected window.
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:74
onAfterRender
▸ onAfterRender(thisNode
): void
A callback that is called after the component is rendered.
Parameters
Name | Type | Description |
---|---|---|
thisNode | VNode | The component's VNode. |
Returns
void
Overrides
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:69
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
onDeadZoneChanged
▸ onDeadZoneChanged(deadZone
): void
This method is called when the size of this map's dead zone changes.
Parameters
Name | Type | Description |
---|---|---|
deadZone | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The dead zone. |
Returns
void
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:81
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
MapComponent.onMapProjectionChanged
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:86
onProjectedSizeChanged
▸ onProjectedSizeChanged(): void
This method is called when the size of this map's projected window changes.
Returns
void
Overrides
MapComponent.onProjectedSizeChanged
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:102
onSleep
▸ onSleep(): void
This method is called when the map is put to sleep.
Returns
void
Overrides
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:123
onUpdated
▸ onUpdated(time
, elapsed
): void
This method is called once every update cycle.
Parameters
Name | Type | Description |
---|---|---|
time | number | The current real time as a UNIX timestamp in milliseconds. |
elapsed | number | The elapsed time, in milliseconds, since the last update. |
Returns
void
Overrides
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:107
onWake
▸ onWake(): void
This method is called when the map is awakened.
Returns
void
Overrides
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:116
render
▸ render(): VNode
Renders the component.
Returns
A JSX element to be rendered.
Overrides
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:130
setRootSize
▸ setRootSize(size
): void
Sets the size of this map's root HTML element.
Parameters
Name | Type | Description |
---|---|---|
size | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The new size, in pixels. |
Returns
void
Defined in
src/sdk/components/mapsystem/MapSystemComponent.tsx:96
sleep
▸ sleep(): void
Puts this map to sleep. While asleep, this map will not be updated.
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:89
sleepLayers
▸ sleepLayers(): void
Calls the onSleep() method of this map's layers.
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:177
update
▸ update(time
): void
Updates this map.
Parameters
Name | Type | Description |
---|---|---|
time | number | The current real time as a UNIX timestamp in milliseconds. |
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:240
updateLayers
▸ updateLayers(time
, elapsed
): void
Updates this map's attached layers.
Parameters
Name | Type | Description |
---|---|---|
time | number | The current real time as a UNIX timestamp in milliseconds. |
elapsed | number | The elapsed time, in milliseconds, since the last update. |
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:264
wake
▸ wake(): void
Wakes this map, allowing it to be updated.
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:96
wakeLayers
▸ wakeLayers(): void
Calls the onWake() method of this map's layers.
Returns
void
Inherited from
Defined in
src/sdk/components/map/MapComponent.ts:160