Skip to main content

Class: MapRangeRingLayer

Defined in: src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:71

A map layer which draws a range ring around the map target.

Extends​

Constructors​

Constructor​

new MapRangeRingLayer(props): MapRangeRingLayer

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

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsMapRangeRingLayerPropsThe propertis of the component.

Returns​

MapRangeRingLayer

Inherited from​

MapLabeledRingLayer.constructor

Properties​

canvasLayerRef​

protected readonly canvasLayerRef: NodeReference<MapSyncedCanvasLayer<MapLayerProps<any>>>

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:16

Inherited from​

MapLabeledRingLayer.canvasLayerRef


context?​

optional context: [] = undefined

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

The context on this component, if any.

Inherited from​

MapLabeledRingLayer.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​

MapLabeledRingLayer.contextType


isInit​

protected isInit: boolean = false

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:27

Inherited from​

MapLabeledRingLayer.isInit


labelContainerRef​

protected readonly labelContainerRef: NodeReference<HTMLDivElement>

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:15

Inherited from​

MapLabeledRingLayer.labelContainerRef


props​

props: MapRangeRingLayerProps & ComponentProps

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

The properties of the component.

Inherited from​

MapLabeledRingLayer.props

Methods​

applyStrokeToContext()​

protected applyStrokeToContext(context, lineWidth, strokeStyle, dash): void

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:246

Applies a stroke to a canvas rendering context.

Parameters​

ParameterTypeDescription
contextCanvasRenderingContext2DThe canvas to which to apply a stroke.
lineWidthnumberThe stroke width.
strokeStylestring | CanvasGradient | CanvasPatternThe stroke style.
dashreadonly number[]The stroke dash.

Returns​

void

Inherited from​

MapLabeledRingLayer.applyStrokeToContext


createLabel()​

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

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:96

Creates a ring label. Labels can only be created after this layer 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.

Inherited from​

MapLabeledRingLayer.createLabel


destroy()​

destroy(): void

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:287

Destroys this component.

Returns​

void

Inherited from​

MapLabeledRingLayer.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​

MapLabeledRingLayer.getContext


getRingCenter()​

getRingCenter(): ReadonlyFloat64Array

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:35

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

Returns​

ReadonlyFloat64Array

the center position of this layer's ring.

Inherited from​

MapLabeledRingLayer.getRingCenter


getRingRadius()​

getRingRadius(): number

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:43

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

Returns​

number

the radius of this layer's ring.

Inherited from​

MapLabeledRingLayer.getRingRadius


isRingInView()​

protected isRingInView(): boolean

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:212

Checks whether this layer's ring is in view.

Returns​

boolean

whether this layer's ring is in view.

Inherited from​

MapLabeledRingLayer.isRingInView


isVisible()​

isVisible(): boolean

Defined in: src/sdk/components/map/MapLayer.ts:38

Checks whether this layer is visible.

Returns​

boolean

whether this layer is visible.

Inherited from​

MapLabeledRingLayer.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​

MapLabeledRingLayer.onAfterRender


onAttached()​

onAttached(): void

Defined in: src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:88

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

Returns​

void

Overrides​

MapLabeledRingLayer.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​

MapLabeledRingLayer.onBeforeRender


onDetached()​

onDetached(): void

Defined in: src/sdk/components/map/MapLayer.ts:108

This method is called when this layer is detached from its parent map component.

Returns​

void

Inherited from​

MapLabeledRingLayer.onDetached


onMapProjectionChanged()​

onMapProjectionChanged(mapProjection, changeFlags): void

Defined in: src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:135

This method is called when the map projection changes.

Parameters​

ParameterTypeDescription
mapProjectionMapProjectionthis layer's map projection.
changeFlagsnumberThe types of changes made to the projection.

Returns​

void

Overrides​

MapLabeledRingLayer.onMapProjectionChanged


onSleep()​

onSleep(): void

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:142

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

Returns​

void

Inherited from​

MapLabeledRingLayer.onSleep


onUpdated()​

onUpdated(time, elapsed): void

Defined in: src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:153

This method is called once every map update cycle.

Parameters​

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

Returns​

void

Overrides​

MapLabeledRingLayer.onUpdated


onVisibilityChanged()​

onVisibilityChanged(isVisible): void

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:118

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

Parameters​

ParameterTypeDescription
isVisiblebooleanWhether the layer is now visible.

Returns​

void

Inherited from​

MapLabeledRingLayer.onVisibilityChanged


onWake()​

onWake(): void

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:133

This method is called when this layer's parent map is woken.

Returns​

void

Inherited from​

MapLabeledRingLayer.onWake


render()​

render(): VNode

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:269

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Inherited from​

MapLabeledRingLayer.render


setRingOutlineStyles()​

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

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:83

Sets the styling for this layer'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

Inherited from​

MapLabeledRingLayer.setRingOutlineStyles


setRingPosition()​

setRingPosition(center, radius): void

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:52

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

Parameters​

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

Returns​

void

Inherited from​

MapLabeledRingLayer.setRingPosition


setRingStrokeStyles()​

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

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:69

Sets the styling for this layer'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

Inherited from​

MapLabeledRingLayer.setRingStrokeStyles


setVisible()​

setVisible(val): void

Defined in: src/sdk/components/map/MapLayer.ts:46

Sets this layer's visibility.

Parameters​

ParameterTypeDescription
valbooleanWhether this layer should be visible.

Returns​

void

Inherited from​

MapLabeledRingLayer.setVisible


updateFromVisibility()​

protected updateFromVisibility(): void

Defined in: src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:79

Updates this layer according to its current visibility.

Returns​

void

Overrides​

MapLabeledRingLayer.updateFromVisibility


updateRingPosition()​

protected updateRingPosition(): void

Defined in: src/sdk/components/map/layers/MapLabeledRingLayer.tsx:182

Updates the position of this layer's ring.

Returns​

void

Inherited from​

MapLabeledRingLayer.updateRingPosition