GeoDrawEllipsoidWidget

球体符号绘制与编辑控件类

new Cesium.GeoDrawEllipsoidWidget(options)

Name Type Description
options Object optional 参数选项:
Name Type Description
viewer Viewer optional 关联视图对象
actionType String optional 控件动作类型:"draw"为绘制符号,"edit"为编辑符号
symbolOptions Cesium.Color optional 绘制符号对象构造参数,具体参数设置可以参考symbolType所对应的球体符号类文档
Author:
  • zj
Example:
var symbols = [];
	var drawSymbolWidget = new Cesium.GeoDrawEllipsoidWidget({
		viewer: viewer,
		symbolOptions:{
		    color: Cesium.Color.fromCssColorString('rgba(34,46,225,0.4)'),
		    brightness: 3.0,
		    gradient: true			
		}
	});
	drawSymbolWidget.onDrawCompleted.addEventListener(function(symbol){
		symbols.push(symbol);
		setTimeout(function(){
			drawSymbolWidget.editSymbol(symbol);
		});
	});
Demo:

Methods

activate()

激活符号绘制控件

deactivate()

关闭符号绘制控件对象

editSymbol(symbol)

编辑指定球体符号对象
Name Type Description
symbol Object 球体符号对象

endEditSymbol()

结束当前符号编辑