ShapeCreator

new Cesium.ShapeCreator(viewer)

绘制、创建几何对象
Name Type Description
viewer Viewer 场景对象

Members

clampToGround : Boolean

是否贴地

createCircleFinishEvent : Event

创建圆对象完成事件监听

createCircleMovingEvent : Event

创建圆对象移动事件监听

createLineFinishEvent : Event

创建单线对象完成事件监听

createLineMovingEvent : Event

创建单线对象移动事件监听

createPointsFinishEvent : Event

创建多点对象完成事件监听

createPointsMovingEvent : Event

创建多点对象移动事件监听

createPolygonFinishEvent : Event

创建多边形对象完成事件监听

createPolygonMovingEvent : Event

创建多边形对象移动事件监听

createPolylineFinishEvent : Event

创建多线对象完成事件监听

createPolylineMovingEvent : Event

创建多线对象移动事件监听

createRectangleFinishEvent : Event

创建矩形对象完成事件监听

createRectangleMovingEvent : Event

创建矩形对象移动事件监听
对象填充颜色
线对象颜色
线宽度
创建点对象颜色
点对象完成事件监听
点对象移动事件监听
创建点对象大小

Methods

清空全部未几何对象
绘制圆形几何体
绘制单条线
绘制单点对象,右击结束
Example:
const shapeCreator=new Cesium.ShapeCreatoror(cesiumViewer);
shapeCreator.createPoint();
shapeCreator.pointFinishEvent.addEventListener(function(result){
         console.log(result);
  });
shapeCreator.pointMovingEvent.addEventListener(function(result){
       console.log(result);
	  });
绘制多点
多边形几何体
多线几何体
绘制矩形几何体

destroy()undefined

销毁当前对象。包括清空绘制对象,释放鼠标交互,当前对象内部变量和事件等置空操作。调用ShapeCreator.isDestroyed函数返回true;
Returns:

isDestroyed()boolean

当前对象是否被销毁。
Returns:
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.