Skip to main content

Class: MapRangeCompassLayer

A map layer which draws a range compass in front of the map target.

Hierarchy

Constructors

constructor

new MapRangeCompassLayer(props): MapRangeCompassLayer

Creates an instance of a DisplayComponent.

Parameters

NameTypeDescription
propsMapRangeCompassLayerPropsThe propertis of the component.

Returns

MapRangeCompassLayer

Inherited from

MapLayer<MapRangeCompassLayerProps>.constructor

Defined in

src/sdk/components/FSComponent.ts:73

Properties

context

Optional context: [] = undefined

The context on this component, if any.

Inherited from

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

MapLayer.contextType

Defined in

src/sdk/components/FSComponent.ts:67


props

props: MapRangeCompassLayerProps & ComponentProps

The properties of the component.

Inherited from

MapLayer.props

Defined in

src/sdk/components/FSComponent.ts:61


ARC_ANGULAR_WIDTH

Static Readonly ARC_ANGULAR_WIDTH: 120

The angular width of the compass arc, in degrees.

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:160


BEARING_TICK_MAJOR_INTERVAL

Static Readonly BEARING_TICK_MAJOR_INTERVAL: 30

The angular interval, in degrees, between major bearing ticks.

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:163


BEARING_TICK_MINOR_FACTOR

Static Readonly BEARING_TICK_MINOR_FACTOR: 3

The number of minor bearing ticks per major bearing tick.

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:166


RANGE_LABEL_RADIAL_ANGLE

Static Readonly RANGE_LABEL_RADIAL_ANGLE: -135

The radial on which the range label is positioned, in degrees.

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:169

Methods

destroy

destroy(): void

Returns

void

Inherit Doc

Overrides

MapLayer.destroy

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:738


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

MapLayer.getContext

Defined in

src/sdk/components/FSComponent.ts:106


isVisible

isVisible(): boolean

Checks whether this layer is visible.

Returns

boolean

whether this layer is visible.

Inherited from

MapLayer.isVisible

Defined in

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


onAfterRender

onAfterRender(thisNode): void

Parameters

NameType
thisNodeVNode

Returns

void

Inherit Doc

Overrides

MapLayer.onAfterRender

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:248


onAttached

onAttached(): void

Returns

void

Inherit Doc

Overrides

MapLayer.onAttached

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:274


onBeforeRender

onBeforeRender(): void

A callback that is called before the component is rendered.

Returns

void

Inherited from

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

MapLayer.onDetached

Defined in

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


onMapProjectionChanged

onMapProjectionChanged(mapProjection, changeFlags): void

Parameters

NameType
mapProjectionMapProjection
changeFlagsnumber

Returns

void

Inherit Doc

Overrides

MapLayer.onMapProjectionChanged

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:312


onSleep

onSleep(): void

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

Returns

void

Inherited from

MapLayer.onSleep

Defined in

src/sdk/components/map/MapLayer.ts:81


onUpdated

onUpdated(time, elapsed): void

Parameters

NameType
timenumber
elapsednumber

Returns

void

Inherit Doc

Overrides

MapLayer.onUpdated

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:332


onVisibilityChanged

onVisibilityChanged(isVisible): void

Parameters

NameType
isVisibleboolean

Returns

void

Inherit Doc

Overrides

MapLayer.onVisibilityChanged

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:253


onWake

onWake(): void

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

Returns

void

Inherited from

MapLayer.onWake

Defined in

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


render

render(): VNode

Returns

VNode

Inherit Doc

Overrides

MapLayer.render

Defined in

src/garminsdk/components/map/layers/MapRangeCompassLayer.tsx:652


setVisible

setVisible(val): void

Sets this layer's visibility.

Parameters

NameTypeDescription
valbooleanWhether this layer should be visible.

Returns

void

Inherited from

MapLayer.setVisible

Defined in

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