提交
This commit is contained in:
63
example/添加军标.html
Normal file
63
example/添加军标.html
Normal file
@ -0,0 +1,63 @@
|
||||
<!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>
|
Reference in New Issue
Block a user