Skip to main content

Class: MapTerrainColorsController

Controls the display of terrain colors based on the terrain mode value in MapTerrainModule.

Hierarchy

Constructors

constructor

new MapTerrainColorsController(context, colors, groundRelativeBlendDuration?): MapTerrainColorsController

Constructor.

Parameters

NameTypeDefault valueDescription
contextMapSystemContext<MapTerrainColorsControllerModules>undefinedThis controller's map context.
colorsPartial<Record<MapTerrainMode, Readonly<MapTerrainColorsDefinition>>>undefinedThe terrain colors to use for each terrain mode. Default colors will be used for any mode which does not have a colors definition.
groundRelativeBlendDurationnumber0The amount of time, in milliseconds, over which to blend the on-ground and relative terrain mode colors when transitioning between the two. Defaults to 0 milliseconds. A blend transition is only possible if colors are defined for both the on-ground and relative terrain modes, and the colors for both modes have the same number of steps and are applied over the same elevation range.

Returns

MapTerrainColorsController

Overrides

MapSystemController\<MapTerrainColorsControllerModules\>.constructor

Defined in

src/garminsdk/components/map/controllers/MapTerrainColorsController.ts:74

Properties

context

Protected Readonly context: MapSystemContext<MapTerrainColorsControllerModules, any, any, any>

Inherited from

MapSystemController.context

Defined in

src/sdk/components/mapsystem/MapSystemController.ts:24

Accessors

isAlive

get isAlive(): boolean

Whether this controller is alive.

Returns

boolean

Inherited from

MapSystemController.isAlive

Defined in

src/sdk/components/mapsystem/MapSystemController.ts:20

Methods

destroy

destroy(): void

Returns

void

Inherit Doc

Overrides

MapSystemController.destroy

Defined in

src/garminsdk/components/map/controllers/MapTerrainColorsController.ts:172


onAfterMapRender

onAfterMapRender(): void

Returns

void

Inherit Doc

Overrides

MapSystemController.onAfterMapRender

Defined in

src/garminsdk/components/map/controllers/MapTerrainColorsController.ts:105


onAfterUpdated

onAfterUpdated(): void

Returns

void

Inherit Doc

Overrides

MapSystemController.onAfterUpdated

Defined in

src/garminsdk/components/map/controllers/MapTerrainColorsController.ts:140


onBeforeUpdated

onBeforeUpdated(time, elapsed): void

This method is called immediately before this controller's map updates its layers.

Parameters

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

Returns

void

Inherited from

MapSystemController.onBeforeUpdated

Defined in

src/sdk/components/mapsystem/MapSystemController.ts:68


onDeadZoneChanged

onDeadZoneChanged(deadZone): void

This method is called when the dead zone of this controller's map changes.

Parameters

NameTypeDescription
deadZoneReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The map's new dead zone.

Returns

void

Inherited from

MapSystemController.onDeadZoneChanged

Defined in

src/sdk/components/mapsystem/MapSystemController.ts:48


onMapDestroyed

onMapDestroyed(): void

Returns

void

Inherit Doc

Overrides

MapSystemController.onMapDestroyed

Defined in

src/garminsdk/components/map/controllers/MapTerrainColorsController.ts:167


onMapProjectionChanged

onMapProjectionChanged(mapProjection, changeFlags): void

This method is called when the projection of this controller's map changes.

Parameters

NameTypeDescription
mapProjectionMapProjectionThe map projection.
changeFlagsnumberBit flags describing the type of change.

Returns

void

Inherited from

MapSystemController.onMapProjectionChanged

Defined in

src/sdk/components/mapsystem/MapSystemController.ts:58


onSleep

onSleep(): void

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

Returns

void

Inherited from

MapSystemController.onSleep

Defined in

src/sdk/components/mapsystem/MapSystemController.ts:92


onWake

onWake(): void

This method is called when this controller's map is awakened.

Returns

void

Inherited from

MapSystemController.onWake

Defined in

src/sdk/components/mapsystem/MapSystemController.ts:85