Skip to main content

Class: MapLabeledRingCanvasSubLayer<T>

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

Type parameters

NameType
Textends MapSharedCanvasSubLayerProps<any>

Hierarchy

Constructors

constructor

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

Creates an instance of a DisplayComponent.

Type parameters

NameType
Textends MapSharedCanvasSubLayerProps<any>

Parameters

NameTypeDescription
propsTThe propertis of the component.

Returns

MapLabeledRingCanvasSubLayer<T>

Inherited from

MapSharedCanvasSubLayer.constructor

Defined in

src/sdk/components/FSComponent.ts:73

Properties

context

Optional context: [] = undefined

The context on this component, if any.

Inherited from

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

MapSharedCanvasSubLayer.contextType

Defined in

src/sdk/components/FSComponent.ts:67


props

props: T & ComponentProps

The properties of the component.

Inherited from

MapSharedCanvasSubLayer.props

Defined in

src/sdk/components/FSComponent.ts:61

Accessors

display

get display(): MapSharedCanvasInstance

This sublayer's shared canvas instance.

Returns

MapSharedCanvasInstance

Throws

Error if this sublayer is not attached.

Inherited from

MapSharedCanvasSubLayer.display

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:196


projection

get projection(): MapProjection

This sublayer's map projection.

Returns

MapProjection

Throws

Error if this sublayer is not attached.

Inherited from

MapSharedCanvasSubLayer.projection

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:183

Methods

attach

attach(projection, display): void

Attaches this sublayer to a parent layer.

Parameters

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

Returns

void

Inherited from

MapSharedCanvasSubLayer.attach

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:225


createLabel

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

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

Type parameters

NameType
Lextends string | number | HTMLElement | SVGElement | DisplayComponent<any, []>

Parameters

NameTypeDescription
contentVNodeThe content of the new label.

Returns

null | MapLabeledRingLabel<L>

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

Defined in

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


destroy

destroy(): void

Destroys this component.

Returns

void

Overrides

MapSharedCanvasSubLayer.destroy

Defined in

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


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

MapSharedCanvasSubLayer.getContext

Defined in

src/sdk/components/FSComponent.ts:106


getRingCenter

getRingCenter(): Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

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

Returns

Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

the center position of this sublayer's ring.

Defined in

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


getRingRadius

getRingRadius(): number

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

Returns

number

the radius of this sublayer's ring.

Defined in

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


isAttached

isAttached(): boolean

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

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:208


isVisible

isVisible(): boolean

Checks whether this sublayer is visible.

Returns

boolean

Whether this sublayer is visible.

Inherited from

MapSharedCanvasSubLayer.isVisible

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:216


onAfterRender

onAfterRender(node): void

A callback that is called after the component is rendered.

Parameters

NameTypeDescription
nodeVNodeThe component's VNode.

Returns

void

Inherited from

MapSharedCanvasSubLayer.onAfterRender

Defined in

src/sdk/components/FSComponent.ts:87


onAttached

onAttached(): void

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

Returns

void

Overrides

MapSharedCanvasSubLayer.onAttached

Defined in

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


onBeforeRender

onBeforeRender(): void

A callback that is called before the component is rendered.

Returns

void

Inherited from

MapSharedCanvasSubLayer.onBeforeRender

Defined in

src/sdk/components/FSComponent.ts:80


onMapProjectionChanged

onMapProjectionChanged(projection, changeFlags): void

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

Parameters

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

Returns

void

Inherited from

MapSharedCanvasSubLayer.onMapProjectionChanged

Defined in

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


onSleep

onSleep(): void

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

Returns

void

Inherited from

MapSharedCanvasSubLayer.onSleep

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:277


onUpdated

onUpdated(): void

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

Defined in

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


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

MapSharedCanvasSubLayer.onVisibilityChanged

Defined in

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


onWake

onWake(): void

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

Returns

void

Inherited from

MapSharedCanvasSubLayer.onWake

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:270


render

render(): VNode

Renders the component.

Returns

VNode

A JSX element to be rendered.

Overrides

MapSharedCanvasSubLayer.render

Defined in

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


setRingOutlineStyles

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

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

Parameters

NameTypeDescription
width?numberThe new outline width.
style?string | CanvasPattern | CanvasGradientThe new outline style.
dash?readonly number[]The new outline dash.

Returns

void

Defined in

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


setRingPosition

setRingPosition(center, radius): void

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

Parameters

NameTypeDescription
centerReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The new center, in pixels.
radiusnumberThe new radius, in pixels.

Returns

void

Defined in

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


setRingStrokeStyles

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

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

Parameters

NameTypeDescription
width?numberThe new stroke width.
style?string | CanvasPattern | CanvasGradientThe new stroke style.
dash?readonly number[]The new stroke dash.

Returns

void

Defined in

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


setVisible

setVisible(val): void

Sets this sublayer's visibility.

Parameters

NameTypeDescription
valbooleanWhether this sublayer should be visible.

Returns

void

Inherited from

MapSharedCanvasSubLayer.setVisible

Defined in

src/sdk/components/map/layers/MapSharedCanvasLayer.tsx:240


shouldInvalidate

shouldInvalidate(): boolean

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

Defined in

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