---
title: CanvasSourceOptions
source: https://vjmap.com/doc/CanvasSourceOptions.html
---

# CanvasSourceOptions
将画布源类型添加到地图的选项。

类型： `Object`

### Properties
- `type` **`string`**来源类型。必须是`"canvas"`。
- `canvas` **( `string`| `HTMLCanvasElement `)**从中读取像素的画布源。可以是表示画布元素 ID 或`HTMLCanvasElement`本身的字符串。
- `coordinates` **`Array`&lt; `Array`&lt; `number`\>>**四个地理坐标表示在何处放置画布的角部，在指定的`[longitude, latitude]`对。
- `animate` **`boolean`?** 画布源是否是动画的。如果画布是静态的（即不需要在每一帧上重新读取像素），`animate`则应设置为`false`以提高性能。
