new GraphicMultiPoint()
- Source:
Methods
(async, static) appendPoint(point) → {Promise.<Number>}
追加一个点
Parameters:
| Name | Type | Description |
|---|---|---|
point |
Dot |
- Source:
Returns:
追加点的索引
- Type
- Promise.<Number>
(async, static) appendPoints(pointArr) → {Promise.<void>}
追加一组点
Parameters:
| Name | Type | Description |
|---|---|---|
pointArr |
Array.<Dot> |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) createObj() → {Promise.<GraphicMultiPoint>}
构造一个新的 GraphicMultiPoint 对象。
- Source:
Returns:
- Type
- Promise.<GraphicMultiPoint>
(async, static) getPoint(index) → {Promise.<Dot>}
获取指定索引的坐标点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 索引 |
- Source:
Returns:
- Type
- Promise.<Dot>
(async, static) getPointCount() → {Promise.<Number>}
获取坐标点数目
- Source:
Returns:
坐标点数目
- Type
- Promise.<Number>
(async, static) getPoints() → {Promise.<Array>}
获取一组坐标点
- Source:
Returns:
dot数组
- Type
- Promise.<Array>
(async, static) getPointSize() → {Promise.<Number>}
获取点的大小
- Source:
Returns:
- Type
- Promise.<Number>
(async, static) getPointsToDots() → {Promise.<Dots>}
获取坐标点序列Dots
- Source:
Returns:
点序列Dots
- Type
- Promise.<Dots>
(async, static) insertPoint(index, point) → {Promise.<Number>}
在指定索引处插入点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 索引 |
point |
Dot | 插入的点 |
- Source:
Returns:
- Type
- Promise.<Number>
(async, static) removeAllPoints() → {Promise.<void>}
移除所有点
- Source:
Returns:
- Type
- Promise.<void>
(async, static) removePoint(index) → {Promise.<void>}
移除指定索引的点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 索引 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setPoints(pointArray) → {Promise.<void>}
设置一组坐标点
Parameters:
| Name | Type | Description |
|---|---|---|
pointArray |
Array.<Dot> | dot数组 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setPointsByDots(dots) → {Promise.<void>}
通过点序列Dots设置坐标点
Parameters:
| Name | Type | Description |
|---|---|---|
dots |
Dots | dots点序列 |
- Source:
Returns:
- Type
- Promise.<void>
Example
let dotArr = [];
dotArr.push({x: 114.4, y: 30.4});
dotArr.push({x: 114.44, y: 30.41});
dotArr.push({x: 114.5, y: 30.5});
let dotsModule = new Dots();
let dots = await dotsModule.createObj();
await dots.fromObjectArray(dotArr);
await this.graphicMultiPoint.setPointsByDots(dots);
(async, static) setPointSize(size) → {Promise.<void>}
设置点的大小
Parameters:
| Name | Type | Description |
|---|---|---|
size |
Number |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) updatePoint(index, point) → {Promise.<Number>}
更新指定索引处的点
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 索引 |
point |
Dot | 更新的点 |
- Source:
Returns:
成功返回更新的索引,失败返回-1
- Type
- Promise.<Number>