import Base from '../base'; import { Cartesian3 } from 'kmap-3d-engine'; import { LineStyle } from '../interface'; export default class Polyline extends Base { points: Cesium.Cartesian3[]; arrowLengthScale: number; maxArrowLength: number; t: number; constructor(cesium: any, viewer: Cesium.Viewer, style?: LineStyle); getType(): 'polygon' | 'line'; /** * Points are only added upon click events. */ addPoint(cartesian: Cartesian3): void; /** * Draw the shape based on the mouse movement position during the initial drawing. */ updateMovingPoint(cartesian: Cartesian3): void; /** * During editing mode, drag key points to update the corresponding data. */ updateDraggingPoint(cartesian: Cartesian3, index: number): void; /** * Generate geometric shape points based on key points.. */ createGraphic(positions: Cesium.Cartesian3[]): Cesium.Cartesian3[]; getPoints(): Cesium.Cartesian3[]; }