Files
sdk4_demo/example/添加军标.html
2025-07-03 15:12:58 +08:00

63 lines
1.3 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,
PolylineObject: null
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
async createEarth() {
this.sdk = new YJ.YJEarth("app")
let openLeftClick = await new YJ.Global.openLeftClick(this.sdk)
let Draw = new YJ.Draw.DrawPoint(this.sdk)
Draw.start((a, positions) => {
let GroundImage = new YJ.Obj.GroundImage(this.sdk, {
url: './image/20b59ad6cd8047238228dd3fe3f83ac9.png',
positions: positions,
flipe: {
x: false,
y: false
}
})
GroundImage.edit(true)
GroundImage.flyTo()
GroundImage.onClick = (a, b, c) => {
GroundImage.edit(true)
}
setTimeout(() => {
// GroundImage.flipX = true
}, 5000);
})
}
}
})
</script>