Skip to main content

Class: MapSystemComponent<P>

A component that encompasses the compiled map system.

Type parameters

NameType
Pextends MapSystemComponentProps<any> = MapSystemComponentProps<any>

Hierarchy

Constructors

constructor

new MapSystemComponent<P>(props): MapSystemComponent<P>

Type parameters

NameType
Pextends MapSystemComponentProps<any> = MapSystemComponentProps<any>

Parameters

NameType
propsP

Returns

MapSystemComponent<P>

Inherit Doc

Overrides

MapComponent.constructor

Defined in

src/sdk/components/mapsystem/MapSystemComponent.tsx:61

Properties

context

Optional context: [] = undefined

The context on this component, if any.

Inherited from

MapComponent.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

MapComponent.contextType

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

MapComponent.mapProjection

Defined in

src/sdk/components/map/MapComponent.ts:42


props

props: P & ComponentProps

The properties of the component.

Inherited from

MapComponent.props

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

NameTypeDescription
layerMapLayer<MapLayerProps<any>>The layer to attach.

Returns

void

Inherited from

MapComponent.attachLayer

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

NameTypeDescription
thisNodeVNodeThis component's VNode.

Returns

void

Inherited from

MapComponent.attachLayers

Defined in

src/sdk/components/map/MapComponent.ts:140


destroy

destroy(): void

Destroys this component.

Returns

void

Overrides

MapComponent.destroy

Defined in

src/sdk/components/mapsystem/MapSystemComponent.tsx:139


detachLayer

detachLayer(layer): boolean

Detaches a layer from this map component.

Parameters

NameTypeDescription
layerMapLayer<MapLayerProps<any>>The layer to detach.

Returns

boolean

Whether the layer was succesfully detached.

Inherited from

MapComponent.detachLayer

Defined in

src/sdk/components/map/MapComponent.ts:224


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

MapComponent.getContext

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

MapComponent.getProjectedSize

Defined in

src/sdk/components/map/MapComponent.ts:74


onAfterRender

onAfterRender(thisNode): void

A callback that is called after the component is rendered.

Parameters

NameTypeDescription
thisNodeVNodeThe component's VNode.

Returns

void

Overrides

MapComponent.onAfterRender

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

MapComponent.onBeforeRender

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

NameTypeDescription
deadZoneReadonly<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

NameTypeDescription
mapProjectionMapProjectionThis layer's map projection.
changeFlagsnumberThe 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

MapComponent.onSleep

Defined in

src/sdk/components/mapsystem/MapSystemComponent.tsx:123


onUpdated

onUpdated(time, elapsed): void

This method is called once every update cycle.

Parameters

NameTypeDescription
timenumberThe current real time as a UNIX timestamp in milliseconds.
elapsednumberThe elapsed time, in milliseconds, since the last update.

Returns

void

Overrides

MapComponent.onUpdated

Defined in

src/sdk/components/mapsystem/MapSystemComponent.tsx:107


onWake

onWake(): void

This method is called when the map is awakened.

Returns

void

Overrides

MapComponent.onWake

Defined in

src/sdk/components/mapsystem/MapSystemComponent.tsx:116


render

render(): VNode

Renders the component.

Returns

VNode

A JSX element to be rendered.

Overrides

MapComponent.render

Defined in

src/sdk/components/mapsystem/MapSystemComponent.tsx:130


setRootSize

setRootSize(size): void

Sets the size of this map's root HTML element.

Parameters

NameTypeDescription
sizeReadonly<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

MapComponent.sleep

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

MapComponent.sleepLayers

Defined in

src/sdk/components/map/MapComponent.ts:177


update

update(time): void

Updates this map.

Parameters

NameTypeDescription
timenumberThe current real time as a UNIX timestamp in milliseconds.

Returns

void

Inherited from

MapComponent.update

Defined in

src/sdk/components/map/MapComponent.ts:240


updateLayers

updateLayers(time, elapsed): void

Updates this map's attached layers.

Parameters

NameTypeDescription
timenumberThe current real time as a UNIX timestamp in milliseconds.
elapsednumberThe elapsed time, in milliseconds, since the last update.

Returns

void

Inherited from

MapComponent.updateLayers

Defined in

src/sdk/components/map/MapComponent.ts:264


wake

wake(): void

Wakes this map, allowing it to be updated.

Returns

void

Inherited from

MapComponent.wake

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

MapComponent.wakeLayers

Defined in

src/sdk/components/map/MapComponent.ts:160