|
@ -627,6 +627,9 @@ |
|
|
this.clearAlarmModel(eventSerialNum) |
|
|
this.clearAlarmModel(eventSerialNum) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
$mitt.on('fly', function (callback) { |
|
|
|
|
|
that.fly(callback) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -841,7 +844,7 @@ |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
async fly() { |
|
|
async fly(callback:any = null) { |
|
|
let position, rotation, viewDistance, duration; |
|
|
let position, rotation, viewDistance, duration; |
|
|
// |
|
|
// |
|
|
let parentData = |
|
|
let parentData = |
|
@ -866,6 +869,11 @@ |
|
|
rotation = [data.rotationX, data.rotationY, data.rotationZ]; |
|
|
rotation = [data.rotationX, data.rotationY, data.rotationZ]; |
|
|
viewDistance = data.viewDistance; |
|
|
viewDistance = data.viewDistance; |
|
|
duration = data.duration ? data.duration : 0; |
|
|
duration = data.duration ? data.duration : 0; |
|
|
|
|
|
// 处理mitt事件 |
|
|
|
|
|
if(callback){ |
|
|
|
|
|
callback(position,rotation,viewDistance,duration); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
this._earth.camera.flyTo(position, viewDistance, rotation, duration); |
|
|
this._earth.camera.flyTo(position, viewDistance, rotation, duration); |
|
|
// 地图复原事件 |
|
|
// 地图复原事件 |
|
|
window.$flyTo = this.flyTo = () => { |
|
|
window.$flyTo = this.flyTo = () => { |
|
@ -877,6 +885,11 @@ |
|
|
rotation = [parentData[0].rotationX, parentData[0].rotationY, parentData[0].rotationZ]; |
|
|
rotation = [parentData[0].rotationX, parentData[0].rotationY, parentData[0].rotationZ]; |
|
|
viewDistance = parentData[0].viewDistance; |
|
|
viewDistance = parentData[0].viewDistance; |
|
|
duration = parentData[0].duration; |
|
|
duration = parentData[0].duration; |
|
|
|
|
|
// 处理mitt事件 |
|
|
|
|
|
if(callback){ |
|
|
|
|
|
callback(position,rotation,viewDistance,duration); |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
// 先飞入到能看见红旗 |
|
|
// 先飞入到能看见红旗 |
|
|
this._earth.camera.flyTo(position, viewDistance, rotation, duration); |
|
|
this._earth.camera.flyTo(position, viewDistance, rotation, duration); |
|
|
// 地图复原事件 |
|
|
// 地图复原事件 |
|
|