GeoDrawArrowSymbolWidget

箭头符号绘制与编辑控件类

new Cesium.GeoDrawArrowSymbolWidget(options)

Name Type Description
options Object optional 参数选项:
Name Type Description
viewer Viewer optional 关联视图对象
actionType String optional 控件动作类型:"draw"为绘制符号,"edit"为编辑符号
symbolType String optional 指定绘制箭头符号类型,可以为以下值:"singlearrow","doublearrow","linearrow","curvearrow"
symbolOptions Cesium.Color optional 绘制符号对象构造参数,具体参数设置可以参考symbolType所对应的箭头符号类文档
Author:
  • zj
Example:
var symbols = [];
	var drawSymbolWidget = new Cesium.GeoDrawArrowSymbolWidget({
		viewer: viewer,
		symbolType: Cesium.GeoElementType.SINGLEARROW,
		symbolOptions:{
			visibleSwallowTail: false,
			lineColor: Cesium.Color.BLUE,
			lineWidth: 10,
			lineStyle: Cesium.GeoElement.LINE_STYLE.SOLID,
			fillMode: Cesium.GeoElement.FILL_MODE.SOLID,,
			fillColor: Cesium.Color.RED,
			fillStartColor: Cesium.Color.RED,
			fillEndColor: Cesium.Color.YELLOW,					
		}
	});
	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()

结束当前符号编辑