Skip to main content

Class: MapLabeledRingCanvasSubLayer<T>

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:10

A map shared canvas sublayer that displays a ring (circle) with one or more labels.

Extends​

Type Parameters​

Type Parameter
T extends MapSharedCanvasSubLayerProps<any>

Constructors​

Constructor​

new MapLabeledRingCanvasSubLayer<T>(props): MapLabeledRingCanvasSubLayer<T>

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

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsTThe propertis of the component.

Returns​

MapLabeledRingCanvasSubLayer<T>

Inherited from​

MapSharedCanvasSubLayer.constructor

Properties​

context?​

optional context: [] = undefined

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

The context on this component, if any.

Inherited from​

MapSharedCanvasSubLayer.context


contextType?​

readonly optional contextType: readonly [] = undefined

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

The type of context for this component, if any.

Inherited from​

MapSharedCanvasSubLayer.contextType


props​

props: T & ComponentProps

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

The properties of the component.

Inherited from​

MapSharedCanvasSubLayer.props

Accessors​

display​

Get Signature​

get protected display(): MapSharedCanvasInstance

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:218

This sublayer's shared canvas instance.

Throws​

Error if this sublayer is not attached.

Returns​

MapSharedCanvasInstance

Inherited from​

MapSharedCanvasSubLayer.display


projection​

Get Signature​

get protected projection(): MapProjection

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:205

This sublayer's map projection.

Throws​

Error if this sublayer is not attached.

Returns​

MapProjection

Inherited from​

MapSharedCanvasSubLayer.projection

Methods​

attach()​

attach(projection, display): void

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:247

Attaches this sublayer to a parent layer.

Parameters​

ParameterTypeDescription
projectionMapProjectionThe map projection used by this sublayer.
displayMapSharedCanvasInstanceThe canvas instance shared by this sublayer.

Returns​

void

Inherited from​

MapSharedCanvasSubLayer.attach


createLabel()​

createLabel<L>(content): MapLabeledRingLabel<L> | null

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

Creates a ring label. Labels can only be created after this sublayer has been rendered.

Type Parameters​

Type Parameter
L extends string | number | HTMLElement | SVGElement | DisplayComponent<any, []>

Parameters​

ParameterTypeDescription
contentVNodeThe content of the new label.

Returns​

MapLabeledRingLabel<L> | null

The newly created ring label, or null if a label could not be created.


destroy()​

destroy(): void

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

Destroys this component.

Returns​

void

Overrides​

MapSharedCanvasSubLayer.destroy


getContext()​

protected getContext(context): never

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

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​

MapSharedCanvasSubLayer.getContext


getRingCenter()​

getRingCenter(): ReadonlyFloat64Array

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:31

Gets the center position of this sublayer's ring, in pixels.

Returns​

ReadonlyFloat64Array

the center position of this sublayer's ring.


getRingRadius()​

getRingRadius(): number

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:39

Gets the radius of this sublayer's ring, in pixels.

Returns​

number

the radius of this sublayer's ring.


isAttached()​

protected isAttached(): boolean

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:230

Checks whether this sublayer is attached to a parent layer.

Returns​

boolean

Whether this sublayer is attached to a parent layer.

Inherited from​

MapSharedCanvasSubLayer.isAttached


isVisible()​

protected isVisible(): boolean

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:238

Checks whether this sublayer is visible.

Returns​

boolean

Whether this sublayer is visible.

Inherited from​

MapSharedCanvasSubLayer.isVisible


onAfterRender()​

onAfterRender(node): void

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

A callback that is called after the component is rendered.

Parameters​

ParameterTypeDescription
nodeVNodeThe component's VNode.

Returns​

void

Inherited from​

MapSharedCanvasSubLayer.onAfterRender


onAttached()​

onAttached(): void

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:120

This method is called when this sublayer is attached to its parent layer.

Returns​

void

Overrides​

MapSharedCanvasSubLayer.onAttached


onBeforeRender()​

onBeforeRender(): void

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

A callback that is called before the component is rendered.

Returns​

void

Inherited from​

MapSharedCanvasSubLayer.onBeforeRender


onMapProjectionChanged()​

onMapProjectionChanged(projection, changeFlags): void

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:309

This method is called when this sublayer's map projection changes.

Parameters​

ParameterTypeDescription
projectionMapProjectionThis sublayer's map projection.
changeFlagsnumberThe types of changes made to the projection.

Returns​

void

Inherited from​

MapSharedCanvasSubLayer.onMapProjectionChanged


onSleep()​

onSleep(): void

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:299

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

Returns​

void

Inherited from​

MapSharedCanvasSubLayer.onSleep


onUpdated()​

onUpdated(): void

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:130

This method is called once every update cycle after this sublayer's shared canvas instance has had a chance to be invalidated.

Returns​

void

Overrides​

MapSharedCanvasSubLayer.onUpdated


onVisibilityChanged()​

onVisibilityChanged(isVisible): void

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:113

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

Parameters​

ParameterTypeDescription
isVisiblebooleanWhether the layer is now visible.

Returns​

void

Overrides​

MapSharedCanvasSubLayer.onVisibilityChanged


onWake()​

onWake(): void

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:292

This method is called when this sublayer's parent layer is awakened.

Returns​

void

Inherited from​

MapSharedCanvasSubLayer.onWake


render()​

render(): VNode

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:224

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Overrides​

MapSharedCanvasSubLayer.render


setRingOutlineStyles()​

setRingOutlineStyles(width?, style?, dash?): void

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:79

Sets the styling for this sublayer's ring outline. Any style that is not explicitly defined will be left unchanged.

Parameters​

ParameterTypeDescription
width?numberThe new outline width.
style?string | CanvasGradient | CanvasPatternThe new outline style.
dash?readonly number[]The new outline dash.

Returns​

void


setRingPosition()​

setRingPosition(center, radius): void

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:48

Sets the center and radius of this sublayer's ring.

Parameters​

ParameterTypeDescription
centerReadonlyFloat64ArrayThe new center, in pixels.
radiusnumberThe new radius, in pixels.

Returns​

void


setRingStrokeStyles()​

setRingStrokeStyles(width?, style?, dash?): void

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:65

Sets the styling for this sublayer's ring stroke. Any style that is not explicitly defined will be left unchanged.

Parameters​

ParameterTypeDescription
width?numberThe new stroke width.
style?string | CanvasGradient | CanvasPatternThe new stroke style.
dash?readonly number[]The new stroke dash.

Returns​

void


setVisible()​

setVisible(val): void

Defined in: src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:262

Sets this sublayer's visibility.

Parameters​

ParameterTypeDescription
valbooleanWhether this sublayer should be visible.

Returns​

void

Inherited from​

MapSharedCanvasSubLayer.setVisible


shouldInvalidate()​

shouldInvalidate(): boolean

Defined in: src/sdk/components/map/layers/MapLabeledRingCanvasSubLayer.tsx:125

This method is called at the beginning of every update cycle to check whether this sublayer's shared canvas instance should be invalidated. If the canvas is already invalidated, then this method will not be called.

Returns​

boolean

Whether this sublayer's shared canvas instance should be invalidated.

Overrides​

MapSharedCanvasSubLayer.shouldInvalidate