Skip to main content

Interface: MapCachedCanvasLayerCanvasInstance

An instance of a canvas within a MapCachedCanvasLayer.

Hierarchy

Implemented by

Properties

canvas

Readonly canvas: HTMLCanvasElement

This instance's canvas element.

Inherited from

MapCanvasLayerCanvasInstance.canvas

Defined in

src/sdk/components/map/layers/MapCanvasLayer.tsx:17


context

Readonly context: CanvasRenderingContext2D

This instance's canvas 2D rendering context.

Inherited from

MapCanvasLayerCanvasInstance.context

Defined in

src/sdk/components/map/layers/MapCanvasLayer.tsx:20


geoProjection

Readonly geoProjection: GeoProjection

The projection used to draw this instance's canvas image.

Defined in

src/sdk/components/map/layers/MapCachedCanvasLayer.ts:176


isDisplayed

Readonly isDisplayed: boolean

Whether this instance's canvas is displayed.

Inherited from

MapCanvasLayerCanvasInstance.isDisplayed

Defined in

src/sdk/components/map/layers/MapCanvasLayer.tsx:23


isInvalid

Readonly isInvalid: boolean

Whether this instance's transform is invalid.

Defined in

src/sdk/components/map/layers/MapCachedCanvasLayer.ts:173


reference

Readonly reference: MapCachedCanvasLayerReference

This instance's map projection reference. The rendering of items to this instance's canvas is based on this reference.

Defined in

src/sdk/components/map/layers/MapCachedCanvasLayer.ts:167


transform

Readonly transform: MapCachedCanvasLayerTransform

This instance's transform.

Defined in

src/sdk/components/map/layers/MapCachedCanvasLayer.ts:170

Methods

clear

clear(): void

Clears this canvas.

Returns

void

Inherited from

MapCanvasLayerCanvasInstance.clear

Defined in

src/sdk/components/map/layers/MapCanvasLayer.tsx:26


invalidate

invalidate(): void

Invalidates this canvas instance. This also clears the canvas.

Returns

void

Defined in

src/sdk/components/map/layers/MapCachedCanvasLayer.ts:193


reset

reset(): void

Resets this instance's canvas. This will erase the canvas of all drawn pixels, reset its state (including all styles, transformations, and cached paths), and clear the Coherent GT command buffer associated with it.

Returns

void

Inherited from

MapCanvasLayerCanvasInstance.reset

Defined in

src/sdk/components/map/layers/MapCanvasLayer.tsx:32


syncWithCanvasInstance

syncWithCanvasInstance(other): void

Syncs this canvas instance with another canvas instance.

Parameters

NameTypeDescription
otherMapCachedCanvasLayerCanvasInstancethe canvas instance with which to sync.

Returns

void

Defined in

src/sdk/components/map/layers/MapCachedCanvasLayer.ts:188


syncWithMapProjection

syncWithMapProjection(mapProjection): void

Syncs this canvas instance with the current map projection.

Parameters

NameTypeDescription
mapProjectionMapProjectionThe current map projection.

Returns

void

Defined in

src/sdk/components/map/layers/MapCachedCanvasLayer.ts:182