var targetPosition = Cesium.Cartesian3.fromDegrees(116.57, 26.91, 2000.0);
viewer.entities.add({
name:"雷达四凌锥体",
position:targetPosition,
orientation: Cesium.Transforms.headingPitchRollQuaternion(targetPosition,
new Cesium.HeadingPitchRoll(Cesium.Math.toRadians(0),Cesium.Math.toRadians(0),
0)),
ellipsoid:{
radii: new Cesium.Cartesian3(600000, 600000, 600000),
innerRadii:new Cesium.Cartesian3(10000, 10000, 10000),
minimumClock:Cesium.Math.toRadians(-15),
maximumClock:Cesium.Math.toRadians(-15),
minimumCone:Cesium.Math.toRadians(75),
maximumCone:Cesium.Math.toRadians(105),
material:Cesium.Color.fromCssColorString("#f33349").widthAlpha(0.3),
outline:true
}
})
具体属性含义可参考CesiumAPI,具体参数根据实际情况调整而调整。
根据CallbackProperty调整相应的数值可实现探测效果功能(可自行试着升级一下哦)。