Skip to content

绘制工具

  • 绘制点线面
typescript
const draw = createDraw()

可配置参数

typescript
type CreateDraw = {
  /**
   *@description 创建绘制对象
   *@param options.pointColor 点颜色
   *@param options.pointSize 点大小
   *@param options.lineColor 线颜色
   *@param options.lineFillColor 填充颜色
   *@param options.lineWidth 线宽
   *@param options.endIsShow 绘制结束是否还显示
   *@param globeID  地球id
   *@return Draw
   */
  (options: DrawOptions, globeID?: string): Draw;
};

方法

dragDrawPoint 拖动定位点

typescript
draw.dragDrawPoint((result)=>{}) //传入回调获取坐标

image-20240619155159630

drawPoint 绘制点

typescript
draw.drawPoint().then((result)=>{})

image-20240619155417040

drawRectangle 绘制矩形

typescript
draw.drawRectangle().then((result)=>{})

image-20240619155614633

drawCircle 绘制圆

typescript
draw.drawCircle().then((result)=>{})

image-20240619155720894

drawCustom 自由绘制

typescript
draw.drawCustom().then((result)=>{})

image-20240619160006080

drawLine 绘制线

typescript
draw.drawLine().then((result)=>{})

image-20240619161501186

配置