方法
锥形传感器
ConicSensor(startPosition, endPosition, option)
参数描述:
名称 |
类型 |
描述 |
startPosition |
Cartesian3
|
可选
起点坐标。 |
endPosition |
Cartesian3
|
可选
终点坐标 |
option |
Object
|
可选
参数
名称 |
类型 |
默认值 |
描述 |
color |
String
|
rgba(255,0,0,0.2)
|
可选
填充色 |
outline |
Boolean
|
false
|
可选
显示边框 |
outlineColor |
String
|
rgba(255,255,255,0.2)
|
可选
边框色 |
angle |
Number
|
10
|
可选
夹角 |
|
这个方法用于创建圆锥
createCone(position, cylinder, name, GroupID) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
position |
Array
|
可选
一个经纬度数组。 |
cylinder |
object
|
可选
对象。对象{
length: 400000.0,
topRadius: 0.0,
bottomRadius: 200000.0,
material: this._cesium.Color.GREEN
} |
name |
String
|
可选
圆锥显示的文字。 |
GroupID |
String
|
可选
圆锥显示的文字。 |
返回:
返回一个Cesium的对象。
仿照te修改
这个方法用于创建圆锥
CreateCone(Position, Radius, ObjectHeight, LineColor, FillColor, NumOfSegments, GroupID, Description) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
Position |
Object
|
可选
Position表示地面对象的位置和方向。对象{
Altitude:高度。
AltitudeType:枚举确定高度如何解译。
Cartesian:一个布尔值,决定是否基于直角坐标系计算。
Distance:从摄像机到位置的距离。
Pitch:相机或对象的倾斜角度。
Roll:对象的滚动角。
X:X坐标。
Y:Y坐标。
Yaw:该相机或对象的方向角。
} |
Radius |
number
|
可选
圆锥体的半径。 |
ObjectHeight |
number
|
可选
圆锥体的高度。 |
LineColor |
String
|
可选
组成圆锥体的线的颜色。颜色值由RGB定义。 |
FillColor |
String
|
可选
圆锥的填充色。颜色值由RGB定义。 |
NumOfSegments |
number
|
可选
组成圆锥体的部分数目。部分数据越多,圆锥体越圆滑。 |
GroupID |
String
|
可选
组。 |
Description |
String
|
可选
显示在信息树中圆锥的名称。 |
返回:
返回一个Cesium的对象。
这个方法用于创建雷达
createConeRadar(position, cylinder, name, GroupID) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
position |
Array
|
可选
一个经纬度数组。 |
cylinder |
object
|
可选
对象。对象{
length: 400000.0,
topRadius: 0.0,
bottomRadius: 200000.0,
material: this._cesium.Color.GREEN
} |
name |
String
|
可选
圆锥显示的文字。 |
GroupID |
String
|
可选
圆锥显示的文字。 |
返回:
返回一个Cesium的对象。
仿照te修改
这个方法用于创建圆柱
CreateCylinder(Position, Radius, ObjectHeight, LineColor, FillColor, NumOfSegments, GroupID, Description) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
Position |
Object
|
可选
Position表示地面对象的位置和方向。对象{
Altitude:高度。
AltitudeType:枚举确定高度如何解译。
Cartesian:一个布尔值,决定是否基于直角坐标系计算。
Distance:从摄像机到位置的距离。
Pitch:相机或对象的倾斜角度。
Roll:对象的滚动角。
X:X坐标。
Y:Y坐标。
Yaw:该相机或对象的方向角。
} |
Radius |
number
|
可选
圆柱体的半径。 |
ObjectHeight |
number
|
可选
圆柱体的高度。 |
LineColor |
String
|
可选
组成圆柱体的线的颜色。颜色值由RGB定义。 |
FillColor |
String
|
可选
圆柱的填充色。颜色值由RGB定义。 |
NumOfSegments |
number
|
可选
组成圆柱体的部分数目。部分数据越多,圆柱体越圆滑。 |
GroupID |
String
|
可选
组。 |
Description |
String
|
可选
显示在信息树中圆柱名称。 |
返回:
返回一个Cesium的对象。
向三维场景中添加圆柱(可编辑,升级版)。
createCylinderOptimization(option, method) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
option |
Object
|
可选
圆柱参数 |
method |
function
|
可选
回调函数 |
返回:
返回一个Cesium的对象。
雷达视角(自定义)
createRadarMask(name, position, option, GroupID) → Promise.<Object>
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
雷达显示的文字。 |
position |
Array
|
可选
一个经纬度数组。 |
option |
object
|
可选
雷达参数。对象{
radius: 100, //半径
yaw: 0, //雷达方向(可选)
angle: 60, //雷达夹角(可选)
scanAngle: 15, //扫描夹角(可选)
speed: 1, //倍速(可选)
maxLat: 105, //下维度(可选)
minLat: 75, //上维度(可选)
stackPartitions: 64, //横向网格数(可选)
slicePartitions: 64, //纵向网格数(可选)
color: 'rgba(255,255,255,0.5)', //雷达遮罩颜色(可选)
outlineColor: 'rgba(255,255,255,0.5)', //雷达遮罩边框线颜色(可选)
scanColor: 'rgba(255,0,0,0.5)', //扫描颜色(可选)
} |
GroupID |
String
|
可选
GroupID。 |
返回:
返回一个Cesium的对象。
雷达遮罩动态扫描(自定义)
createRadarMaskScan(name, position, option, GroupID) → Cone
调用方法:
//雷达遮罩扫描(自定义)
var option = {
radius: 100, //半径
// yaw: 0, //雷达方向(可选)
angle: 120, //雷达夹角(可选)
scanAngle: 30, //扫描夹角(可选)
speed: 5, //倍速(可选)
maxLat: 90, //下维度(可选)
minLat: 45, //上维度(可选)
stackPartitions: 40, //横向网格数(可选)
slicePartitions: 80, //纵向网格数(可选)
//color: 'rgba(255,255,255,0.5)', //雷达遮罩颜色(可选)
//outlineColor: 'rgba(255,255,255,0.5)', //雷达遮罩边框线颜色(可选)
//scanColor: 'rgba(255,0,0,0.5)', //扫描颜色(可选)
};
var position1 = [114, 30, 0];
// 雷达模型
let Radar1 = sgworld.Creator.addSimpleGraphic('model', {
url: "http://183.162.245.49:8099/ModelLibrary/太空/leida.glb",
scale: 0.1,
position: new Cesium.Cartesian3.fromDegrees(...position1),
removeEdit: true // 屏蔽全局标绘编辑功能
});
// 雷达遮罩
sgworld.Creator.createRadarMaskScan('雷达遮罩扫描1', position1, option)
参数描述:
名称 |
类型 |
描述 |
name |
String
|
可选
名称 |
position |
Array
|
Entity
|
可选
一个经纬度数组或entity对象。 |
option |
Object
|
可选
雷达参数。
名称 |
类型 |
默认值 |
描述 |
radius |
Number
|
100
|
可选
半径 |
yaw |
Number
|
0
|
可选
雷达方向 |
angle |
Number
|
60
|
可选
雷达夹角 |
scanAngle |
Number
|
15
|
可选
扫描夹角 |
speed |
Number
|
1
|
可选
倍速 |
maxLat |
Number
|
105
|
可选
下维度 |
minLat |
Number
|
75
|
可选
上维度 |
stackPartitions |
Number
|
30
|
可选
横向网格数 |
slicePartitions |
Number
|
30
|
可选
纵向网格数 |
color |
String
|
'rgba(255,255,255,0.5)'
|
可选
雷达遮罩颜色 |
outlineColor |
String
|
'rgba(255,255,255,0.5)'
|
可选
雷达遮罩边框线颜色 |
scanColor |
String
|
'rgba(255,0,0,0.5)'
|
可选
扫描颜色 |
trackedEntity |
Entity
|
|
可选
跟踪目标对象 |
|
GroupID |
String
|
可选
GroupID。 |
返回:
雷达遮罩动态扫描(半球)
createRectangularSensor(position, cylinder, name, GroupID) → Cone
调用方法:
var cylinder = {
radius: 100, //半径
angle: 30, //扫描角度(可选)
speed: 5, //倍速(可选)
stackPartitions: 80, //横向网格数(可选)
slicePartitions: 80, //纵向网格数(可选)
//color: 'rgba(255,255,255,0.5)', //球颜色(可选)
//outlineColor: 'rgba(255,255,255,0.5)', //球边框线颜色(可选)
wallColor: 'rgba(255,255,255,0)', //扫描墙颜色(可选)
//wallOutlineColor: 'rgba(255,0,0,0.5)', //扫描墙颜色(可选)
//surfaceColor: 'rgba(255,0,0,0.5)', //扫描夹角颜色(可选)
};
var item = sgworld.Creator.createRectangularSensor(position, cylinder);
参数描述:
名称 |
类型 |
描述 |
position |
Array
|
可选
一个经纬度数组。 |
cylinder |
object
|
可选
参数
名称 |
类型 |
描述 |
radius |
Number
|
可选
半径 |
angle |
Number
|
可选
扫描角度 |
speed |
Number
|
可选
倍速 |
stackPartitions |
Number
|
可选
横向网格数 |
slicePartitions |
Number
|
可选
纵向网格数 |
color |
String
|
可选
球颜色 |
outlineColor |
String
|
可选
球边框线颜色 |
wallColor |
String
|
可选
扫描墙颜色 |
wallOutlineColor |
String
|
可选
扫描墙边框颜色 |
surfaceColor |
String
|
可选
扫描夹角颜色 |
|
name |
String
|
可选
名称 |
GroupID |
String
|
可选
父节点id |
返回:
返回一个Cone的对象。
向三维场景中添加锥。
参数描述:
名称 |
类型 |
描述 |
method |
object
|
可选
回调函数 |
向三维场景中添加圆柱。
参数描述:
名称 |
类型 |
描述 |
method |
object
|
可选
回调函数 |
cylinder导出工程数据
获取cylinder样式
获取体积
参数描述:
名称 |
类型 |
描述 |
cylinder |
Object
|
可选
cylinder对象 |
返回:
返回体积。
设置CylinderGraphics圆柱体底部的半径
setBottomRadius(CylinderGraphics, length) → Object
参数描述:
名称 |
类型 |
描述 |
CylinderGraphics |
Object
|
可选
CylinderGraphics对象 |
length |
String
|
可选
长度。 |
返回:
返回一个CylinderGraphics对象。
设置面的贴图
setCylinderImage(polygon, 图片路径。) → Object
参数描述:
名称 |
类型 |
描述 |
polygon |
Object
|
可选
polygon对象 |
图片路径。 |
url
|
|
返回:
返回一个polygon对象。
设置球的贴图一个Cartesian2属性,指定图像在每个方向上重复的次数。
setCylinderRepeat(Ellipsoid, x和y上的比例。) → Object
参数描述:
名称 |
类型 |
描述 |
Ellipsoid |
Object
|
可选
Ellipsoid对象 |
x和y上的比例。 |
Object
|
|
返回:
返回一个Ellipsoid对象。
修改圆柱的可视距离
setDistanceDisplayCondition(polygon, min, max) → Object
参数描述:
名称 |
类型 |
描述 |
polygon |
Object
|
可选
polygon对象 |
min, max |
String
|
可选
设置线段的可视距离 |
返回:
返回一个polyline对象。
设置圆柱的高度
参数描述:
名称 |
类型 |
描述 |
polygon |
Object
|
可选
polygon对象 |
height |
double
|
可选
高度 |
返回:
返回一个polygon对象。
设置圆柱或圆锥的高度类型
参数描述:
名称 |
类型 |
描述 |
cylinder |
Object
|
可选
cylinder对象 |
type |
int
|
可选
1:该位置被夹在地形上。2:这个职位是绝对的。3:位置高度是地形上方的高度。 |
返回:
返回一个对象。
设置CylinderGraphics的圆柱长度的数字属性
setLength(CylinderGraphics, length) → Object
参数描述:
名称 |
类型 |
描述 |
CylinderGraphics |
Object
|
可选
CylinderGraphics对象 |
length |
String
|
可选
长度。 |
返回:
返回一个CylinderGraphics对象。
设置CylinderGraphics的用于填充圆柱体的材料。
setMaterial(CylinderGraphics, Material) → Object
参数描述:
名称 |
类型 |
描述 |
CylinderGraphics |
Object
|
可选
CylinderGraphics对象 |
Material |
MaterialProperty
|
可选
材料例如:Color.WHITE。 |
返回:
返回一个CylinderGraphics对象。
设置CylinderGraphics的用于填充圆柱体的颜色。
setMaterial(CylinderGraphics, htmlColor颜色。) → Object
参数描述:
名称 |
类型 |
描述 |
CylinderGraphics |
Object
|
可选
CylinderGraphics对象 |
htmlColor颜色。 |
htmlColor
|
|
返回:
返回一个CylinderGraphics对象。
设置CylinderGraphics的用于填充圆柱体的材料透明度。
参数描述:
名称 |
类型 |
描述 |
a |
Float
|
可选
透明度 0-1 |
返回:
返回一个CylinderGraphics对象。
设置CylinderGraphics是否显示。
setShow(CylinderGraphics, show) → Object
参数描述:
名称 |
类型 |
描述 |
CylinderGraphics |
Object
|
可选
CylinderGraphics对象 |
show |
define
|
可选
是否显示。 |
返回:
返回一个CylinderGraphics对象。
设置CylinderGraphics的圆柱顶部的半径
setTopRadius(CylinderGraphics, length) → Object
参数描述:
名称 |
类型 |
描述 |
CylinderGraphics |
Object
|
可选
CylinderGraphics对象 |
length |
String
|
可选
长度。 |
返回:
返回一个CylinderGraphics对象。
动态标会
绑定鼠标