47 lines
867 B
HTML
47 lines
867 B
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: {
|
|
createEarth() {
|
|
this.sdk = new YJ.YJEarth("app")
|
|
var lng = 117.90365282568267
|
|
var lat = 40.16773126252592
|
|
this.RadarScan = new YJ.Obj.RadarScan(this.sdk, { show: true, lng, lat, color: "#ff0000", radius: 150, duration: 2000 })
|
|
this.RadarScan.flyTo()
|
|
this.RadarScan.edit(true)
|
|
}
|
|
}
|
|
})
|
|
</script> |