Skip to main content

Class: MapPointerController

Controls the pointer of a map.

Hierarchy

Constructors

constructor

new MapPointerController(context): MapPointerController

Constructor.

Parameters

NameTypeDescription
contextMapSystemContext<MapPointerControllerModules, any, any, any>This controller's map context.

Returns

MapPointerController

Inherited from

MapSystemController<MapPointerControllerModules>.constructor

Defined in

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

Properties

context

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

Inherited from

MapSystemController.context

Defined in

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


pointerModule

Protected Readonly pointerModule: MapPointerModule

Defined in

src/garminsdk/components/map/controllers/MapPointerController.ts:20

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

Destroys this controller.

Returns

void

Inherited from

MapSystemController.destroy

Defined in

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


movePointer

movePointer(dx, dy): void

Moves the map pointer.

Parameters

NameTypeDescription
dxnumberThe horizontal displacement, in pixels.
dynumberThe vertical dispacement, in pixels.

Returns

void

Defined in

src/garminsdk/components/map/controllers/MapPointerController.ts:53


onAfterMapRender

onAfterMapRender(ref): void

This method is called after this controller' map is rendered.

Parameters

NameTypeDescription
refMapSystemComponent<MapSystemComponentProps<any>>A reference to the rendered map.

Returns

void

Inherited from

MapSystemController.onAfterMapRender

Defined in

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


onAfterUpdated

onAfterUpdated(time, elapsed): void

This method is called immediately after 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.onAfterUpdated

Defined in

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


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

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

Returns

void

Inherited from

MapSystemController.onMapDestroyed

Defined in

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


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


setPointerActive

setPointerActive(isActive): void

Activates or deactivates the map pointer.

Parameters

NameTypeDescription
isActivebooleanWhether to activate the map pointer.

Returns

void

Defined in

src/garminsdk/components/map/controllers/MapPointerController.ts:26


targetPointer

targetPointer(): void

Sets the map target to the current position of the pointer. The pointer will also be moved to the new projected target position.

Returns

void

Defined in

src/garminsdk/components/map/controllers/MapPointerController.ts:62


togglePointerActive

togglePointerActive(): boolean

Toggles activation of the map pointer.

Returns

boolean

Whether the map pointer is active after the toggle operation.

Defined in

src/garminsdk/components/map/controllers/MapPointerController.ts:43