69 lines
1.5 KiB
HTML
69 lines
1.5 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>Title</title>
|
||
|
<script src="../sdk/YJEarth.min.js"></script>
|
||
|
<script src="vue.js"></script>
|
||
|
<style>
|
||
|
body {
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
}
|
||
|
</style>
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div id="app" class="fullSize">
|
||
|
|
||
|
</div>
|
||
|
</body>
|
||
|
|
||
|
</html>
|
||
|
|
||
|
<script>
|
||
|
new Vue({
|
||
|
el: "#app",
|
||
|
data: {
|
||
|
sdk: null,
|
||
|
RadarScan: null
|
||
|
},
|
||
|
async mounted() {
|
||
|
await YJ.on()
|
||
|
this.createEarth()
|
||
|
},
|
||
|
methods: {
|
||
|
async createEarth() {
|
||
|
window.sdk = new YJ.YJEarth("app")
|
||
|
let openLeftClick = new YJ.Global.openLeftClick(sdk)
|
||
|
let openRightClick = new YJ.Global.openRightClick(sdk)
|
||
|
var lng = 100
|
||
|
var lat = 40
|
||
|
var alt = 50
|
||
|
this.RadarScan = new YJ.Obj.RadarScanStereoscopic(sdk, { show: true, lng, lat, alt, color: "#ff0000", radius: 150, duration: 2000, label: {
|
||
|
show: true,
|
||
|
|
||
|
} })
|
||
|
this.RadarScan.Dialog.confirmCallBack = (v) => {
|
||
|
console.log(v)
|
||
|
}
|
||
|
this.RadarScan.flyTo()
|
||
|
this.RadarScan.edit(true)
|
||
|
this.RadarScan.onClick = (a, b, c) => {
|
||
|
this.RadarScan.edit(true)
|
||
|
}
|
||
|
console.log(this.RadarScan)
|
||
|
// sdk.viewer.camera.flyTo({
|
||
|
// destination: Cesium.Cartesian3.fromDegrees(lon, lat, 2000),
|
||
|
// orientation: {
|
||
|
// heading: 0.09085393067733083,
|
||
|
// pitch: -1.5329743385768886,
|
||
|
// roll: 0.0,
|
||
|
// },
|
||
|
// duration: 1,
|
||
|
// });
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
</script>
|