GeoCirclePipeEffectLayer

new Cesium.GeoCirclePipeEffectLayer(options)

纹理环绕特效图层类
Name Type Description
options Object optional 参数选项:
Name Type Description
image String optional 纹理贴图路径
imageMapField String optional 纹理贴图路径映射字段名称
imageColor Cesium.Color optional 纹理贴图上非全透明像素的颜色值
imageColorMapField String optional 纹理贴图颜色映射字段名称
topRadius Number optional 顶圆半径
bottomRadius Number optional 底圆半径
length Number optional 高度
rotationXPerFrame Number optional 每帧绕x轴旋转角度
rotationZPerFrame Number optional 每帧绕z轴旋转角度
rotationYPerFrame Number optional 每帧绕y轴旋转角度
startRadian Number optional 贴图起点角度,默认值为0
endRadian Number optional 贴图终点角度,默认值为Math.PI * 2
Author:
  • zj
Example:
//使用本地数据生成图层
	 var effectLayer1 = new Cesium.Visuals.GeoCirclePipeEffectLayer({
	 	topRadius : 30,
	 	bottomRadius : 30,
	 	length : 80,
	 	image : '/geomap-api/JsCesuimDemo/resource/images/GeoCirclePipeAll.png',
	 	rotationZPerFrame : 1.5,
	 	rotationXPerFrame : 0,
	 	rotationYPerFrame : 0,
	 	imageColor: Cesium.Color.RED
	 });
	 viewer.effectLayers.add(effectLayer1);

	 effectLayer1.setData([
	     {
	         "type": "Feature",
	         "properties": {
	             "name": "CirclePipe1",
	             "scanRingRadius":2000.0
	         }, 
	         "geometry": {
	             "type": "Point",
	             "coordinates": [108.95942304170565, 34.21976681372376, 490.82264496210234]
	         }
	     }
	 ]);

	//wfs服务相关信息
	var wfsService = {
			url: "http://192.168.100.231:8889/zjeffecttest/wfs",
			featureType: "effectPoint"
		},
		viewer = initView();

	//使用数据源数据	
	var dataSource = new Cesium.GeoWFSDataSource({
		url: wfsService.url,
		featureType: wfsService.featureType,
	});
		
	//使用数据源生成图层
	var effectLayer2 = new Cesium.GeoCirclePipeEffectLayer({
		dataSource: dataSource,//数据源
		effectTypeMapField: "effectType",
		height: 500,
		topRadius: 80,
		bottomRadius: 80,
		length: 180,
		image: '/geomap-api/JsCesuimDemo/resource/images/GeoCirclePipeAll.png',
		rotationZPerFrame: 1.5,
		rotationXPerFrame: 0,
		rotationYPerFrame: 0,
		imageColor: Cesium.Color.RED
	});

	//添加到地图/地球上
	viewer.effectLayers.add(effectLayer2);
Demo:

Extends

Methods

_checkSupportGeometryType(geometryType, supportGeometryType)

检查指定的几何类型是否为图层对象所支持
Name Type Description
geometryType String | Array.<String> 被检查的几何类型
supportGeometryType Array.<String> 支持的几何类型列表,如果为空则为本图层的supportGeometryType属性值

addTo(map)

绑定到三维地图
Name Type Description
map viewer
Inherited From:

destroy()

销毁图层对象
Inherited From:

getData()

获取图层数据
Inherited From:

getDataSource()

获取数据源
Inherited From:

hide()

隐藏图层

pickFeatures(pickedFeatures, windowPosition)Object

拾取图层中的要素
Name Type Description
pickedFeatures Array 场景中被拾取的对象集合,需要在图层自己内部判断识别出属于自己的,并挂接上图层的属性信息
windowPosition Cartesian2 画布的二维坐标
Returns:
返回固定形态的结构数据
Example:
//返回结构参考样例
{
			eventType: ScreenSpaceEventType.LEFT_CLICK,
			originalLayer: GeoODFaceEffectLayer
			param:{
				info: pickedFeature,
				pickedInfos: pickedFeatureList
			}
		}

remove()

将图层从视图移除

removeDataSource()

移除数据源
Inherited From:

setData(features)

设置图层相关数据
Name Type Description
features Array.<Object> geojson要素数组

setDataSource(dataSource)

设置数据源
Name Type Description
dataSource GeoDataSource
Inherited From:

show()

显示图层