mirror of
https://github.com/ethan-zf/cesium-plot-js.git
synced 2025-06-24 19:47:29 +00:00
20 lines
447 B
TypeScript
20 lines
447 B
TypeScript
![]() |
import Draw from '../draw';
|
||
|
|
||
|
export default class FineArrow extends Draw {
|
||
|
points: any = [];
|
||
|
constructor(cesium, viewer, style) {
|
||
|
super(cesium, viewer);
|
||
|
this.cesium = cesium;
|
||
|
this.setPoints = this.setPoints.bind(this);
|
||
|
this.onClick(this.setPoints);
|
||
|
}
|
||
|
|
||
|
setPoints(cartesian) {
|
||
|
this.points.push(cartesian);
|
||
|
if (this.points.length == 2) {
|
||
|
this.addToMap(this.points);
|
||
|
this.removeEventListener();
|
||
|
}
|
||
|
}
|
||
|
}
|