59 lines
1.2 KiB
HTML
59 lines
1.2 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: {
|
||
|
},
|
||
|
async mounted() {
|
||
|
await YJ.on()
|
||
|
this.createEarth()
|
||
|
},
|
||
|
methods: {
|
||
|
async createEarth() {
|
||
|
window.sdk = new YJ.YJEarth("app")
|
||
|
let openLeftClick = await new YJ.Global.openLeftClick(sdk)
|
||
|
var lng = 100
|
||
|
var lat = 40
|
||
|
this.RadarScan = new YJ.Obj.RadarScan(sdk, { show: true, lng, lat, radius: 50, duration: 2000 })
|
||
|
this.RadarScan.Dialog.confirmCallBack = (e)=>{
|
||
|
console.log('e', e)
|
||
|
}
|
||
|
|
||
|
setTimeout(() => {
|
||
|
new YJ.Obj.RadarScan(sdk, { show: true, lng: lng+0.001, lat, radius: 50, duration: 2000 })
|
||
|
}, 10000);
|
||
|
|
||
|
this.RadarScan.onClick = (a, b, c) => {
|
||
|
console.log(b)
|
||
|
}
|
||
|
this.RadarScan.flyTo()
|
||
|
|
||
|
this.RadarScan.edit(true)
|
||
|
window.RadarScan = this.RadarScan
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
</script>
|