吉奥OD线
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
optional
参数选项:
|
Example:
var data = [{
//飞线路径:起始点,终结点
posititons: [[108.95941461215891, 34.2197731622.101, 489.1], [108.96087018650488, 34.219774276548435, 424.70]],
color: new Cesium.Color(1.0, 0.0, 0.0, 1.0),
width: 2.0,
duration: 4,
baseLineColor: new Cesium.Color(1.0, 0.0, 0.0, 0.2), //基准线的颜色
taperPower: 0.99999 //拖尾线变窄的程度,值越小,拖尾线越细
},{
posititons: [[108.95941461215891, 34.2197731622.101, 489.1], [108.96097122668127, 34.2193674089985, 423.70]],
color: new Cesium.Color(1.0, 1.0, 0.0, 1.0),
width: 10.0,
duration: 6,
baseLineColor: new Cesium.Color(1.0, 1.0, 0.0, 0.2),
taperPower: 0.99999
}]
var odLine = new Cesium.GeoODLine({
viewer: viewer,
data: data,
playing: true,
sampleMaxHeight: 30000, //抛物线的采样最大高程,越大,抛物线越高
sampleMaxPoint: 50, //抛物线的采样最多点数据量
isParabola: true
})
Demo:
Methods
销毁
获取OD线数据
飞行/停止分线
Name | Type | Description |
---|---|---|
playing |
Boolean | 是否播放动画(飞行停止) |
渲染
设置OD线数据
Name | Type | Description |
---|---|---|
data |
Array | 数据 |
Example:
var data = [{
//飞线路径:起始点,终结点
posititons: [[108.95941461215891, 34.2197731622.101, 489.1], [108.96087018650488, 34.219774276548435, 424.70]],
color: new Cesium.Color(1.0, 0.0, 0.0, 1.0),
width: 2.0,
duration: 4,
baseLineColor: new Cesium.Color(1.0, 0.0, 0.0, 0.2),
taperPower: 0.99999
},{
posititons: [[108.95941461215891, 34.2197731622.101, 489.1], [108.96097122668127, 34.2193674089985, 423.70]],
color: new Cesium.Color(1.0, 1.0, 0.0, 1.0),
width: 10.0,
duration: 6,
baseLineColor: new Cesium.Color(1.0, 1.0, 0.0, 0.2),
taperPower: 0.99999
}];
odLine.setData(data);