Class: MapRangeRingLayer
A map layer which draws a range ring around the map target.
Hierarchy
MapLabeledRingLayer
<MapRangeRingLayerProps
>↳
MapRangeRingLayer
Constructors
constructor
• new MapRangeRingLayer(props
): MapRangeRingLayer
Creates an instance of a DisplayComponent.
Parameters
Name | Type | Description |
---|---|---|
props | MapRangeRingLayerProps | The propertis of the component. |
Returns
Inherited from
MapLabeledRingLayer<MapRangeRingLayerProps>.constructor
Defined in
src/sdk/components/FSComponent.ts:73
Properties
canvasLayerRef
• Protected
Readonly
canvasLayerRef: NodeReference
<MapSyncedCanvasLayer
<MapLayerProps
<any
>>>
Inherited from
MapLabeledRingLayer.canvasLayerRef
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:16
context
• Optional
context: [] = undefined
The context on this component, if any.
Inherited from
MapLabeledRingLayer.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
MapLabeledRingLayer.contextType
Defined in
src/sdk/components/FSComponent.ts:67
isInit
• Protected
isInit: boolean
= false
Inherited from
MapLabeledRingLayer.isInit
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:27
labelContainerRef
• Protected
Readonly
labelContainerRef: NodeReference
<HTMLDivElement
>
Inherited from
MapLabeledRingLayer.labelContainerRef
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:15
props
• props: MapRangeRingLayerProps
& ComponentProps
The properties of the component.
Inherited from
MapLabeledRingLayer.props
Defined in
src/sdk/components/FSComponent.ts:61
Methods
applyStrokeToContext
▸ applyStrokeToContext(context
, lineWidth
, strokeStyle
, dash
): void
Applies a stroke to a canvas rendering context.
Parameters
Name | Type | Description |
---|---|---|
context | CanvasRenderingContext2D | The canvas to which to apply a stroke. |
lineWidth | number | The stroke width. |
strokeStyle | string | CanvasPattern | CanvasGradient | The stroke style. |
dash | readonly number [] | The stroke dash. |
Returns
void
Inherited from
MapLabeledRingLayer.applyStrokeToContext
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:232
createLabel
▸ createLabel<L
>(content
): null
| MapLabeledRingLabel
<L
>
Creates a ring label. Labels can only be created after this layer has been rendered.
Type parameters
Name | Type |
---|---|
L | extends string | number | HTMLElement | SVGElement | DisplayComponent <any , []> |
Parameters
Name | Type | Description |
---|---|---|
content | VNode | The content of the new label. |
Returns
null
| MapLabeledRingLabel
<L
>
the newly created ring label, or null if a label could not be created.
Inherited from
MapLabeledRingLayer.createLabel
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:96
destroy
▸ destroy(): void
Returns
void
Inherit Doc
Inherited from
MapLabeledRingLayer.destroy
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:265
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
MapLabeledRingLayer.getContext
Defined in
src/sdk/components/FSComponent.ts:106
getRingCenter
▸ getRingCenter(): Readonly
<Omit
<Float64Array
, "set"
| "sort"
| "copyWithin"
>>
Gets the center position of this layer's ring, in pixels.
Returns
Readonly
<Omit
<Float64Array
, "set"
| "sort"
| "copyWithin"
>>
the center position of this layer's ring.
Inherited from
MapLabeledRingLayer.getRingCenter
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:35
getRingRadius
▸ getRingRadius(): number
Gets the radius of this layer's ring, in pixels.
Returns
number
the radius of this layer's ring.
Inherited from
MapLabeledRingLayer.getRingRadius
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:43
isRingInView
▸ isRingInView(): boolean
Checks whether this layer's ring is in view.
Returns
boolean
whether this layer's ring is in view.
Inherited from
MapLabeledRingLayer.isRingInView
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:198
isVisible
▸ isVisible(): boolean
Checks whether this layer is visible.
Returns
boolean
whether this layer is visible.
Inherited from
MapLabeledRingLayer.isVisible
Defined in
src/sdk/components/map/MapLayer.ts:38
onAfterRender
▸ onAfterRender(node
): void
A callback that is called after the component is rendered.
Parameters
Name | Type | Description |
---|---|---|
node | VNode | The component's VNode. |
Returns
void
Inherited from
MapLabeledRingLayer.onAfterRender
Defined in
src/sdk/components/FSComponent.ts:87
onAttached
▸ onAttached(): void
Returns
void
Inherit Doc
Overrides
MapLabeledRingLayer.onAttached
Defined in
src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:88
onBeforeRender
▸ onBeforeRender(): void
A callback that is called before the component is rendered.
Returns
void
Inherited from
MapLabeledRingLayer.onBeforeRender
Defined in
src/sdk/components/FSComponent.ts:80
onDetached
▸ onDetached(): void
This method is called when this layer is detached from its parent map component.
Returns
void
Inherited from
MapLabeledRingLayer.onDetached
Defined in
src/sdk/components/map/MapLayer.ts:108
onMapProjectionChanged
▸ onMapProjectionChanged(mapProjection
, changeFlags
): void
Parameters
Name | Type |
---|---|
mapProjection | MapProjection |
changeFlags | number |
Returns
void
Inherit Doc
Overrides
MapLabeledRingLayer.onMapProjectionChanged
Defined in
src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:135
onSleep
▸ onSleep(): void
This method is called when this layer's parent map is put to sleep.
Returns
void
Inherited from
MapLabeledRingLayer.onSleep
Defined in
src/sdk/components/map/MapLayer.ts:81
onUpdated
▸ onUpdated(time
, elapsed
): void
Parameters
Name | Type |
---|---|
time | number |
elapsed | number |
Returns
void
Inherit Doc
Overrides
MapLabeledRingLayer.onUpdated
Defined in
src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:153
onVisibilityChanged
▸ onVisibilityChanged(isVisible
): void
Parameters
Name | Type |
---|---|
isVisible | boolean |
Returns
void
Inherit Doc
Inherited from
MapLabeledRingLayer.onVisibilityChanged
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:118
onWake
▸ onWake(): void
This method is called when this layer's parent map is woken.
Returns
void
Inherited from
MapLabeledRingLayer.onWake
Defined in
src/sdk/components/map/MapLayer.ts:74
render
▸ render(): VNode
Returns
VNode
Inherit Doc
Inherited from
MapLabeledRingLayer.render
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:255
setRingOutlineStyles
▸ setRingOutlineStyles(width?
, style?
, dash?
): void
Sets the styling for this layer's ring outline. Any style that is not explicitly defined will be left unchanged.
Parameters
Name | Type | Description |
---|---|---|
width? | number | The new outline width. |
style? | string | CanvasPattern | CanvasGradient | The new outline style. |
dash? | readonly number [] | The new outline dash. |
Returns
void
Inherited from
MapLabeledRingLayer.setRingOutlineStyles
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:83
setRingPosition
▸ setRingPosition(center
, radius
): void
Sets the center and radius of this layer's ring.
Parameters
Name | Type | Description |
---|---|---|
center | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | The new center, in pixels. |
radius | number | The new radius, in pixels. |
Returns
void
Inherited from
MapLabeledRingLayer.setRingPosition
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:52
setRingStrokeStyles
▸ setRingStrokeStyles(width?
, style?
, dash?
): void
Sets the styling for this layer's ring stroke. Any style that is not explicitly defined will be left unchanged.
Parameters
Name | Type | Description |
---|---|---|
width? | number | The new stroke width. |
style? | string | CanvasPattern | CanvasGradient | The new stroke style. |
dash? | readonly number [] | The new stroke dash. |
Returns
void
Inherited from
MapLabeledRingLayer.setRingStrokeStyles
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:69
setVisible
▸ setVisible(val
): void
Sets this layer's visibility.
Parameters
Name | Type | Description |
---|---|---|
val | boolean | Whether this layer should be visible. |
Returns
void
Inherited from
MapLabeledRingLayer.setVisible
Defined in
src/sdk/components/map/MapLayer.ts:46
updateFromVisibility
▸ updateFromVisibility(): void
Returns
void
Inherit Doc
Overrides
MapLabeledRingLayer.updateFromVisibility
Defined in
src/garminsdk/components/map/layers/MapRangeRingLayer.tsx:79
updateRingPosition
▸ updateRingPosition(): void
Updates the position of this layer's ring.
Returns
void
Inherited from
MapLabeledRingLayer.updateRingPosition
Defined in
src/sdk/components/map/layers/MapLabeledRingLayer.tsx:168