Files
4.0/static/example/添加双箭头面.html
2025-07-03 17:39:09 +08:00

52 lines
953 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,
PolygonObject: null
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
createEarth() {
this.sdk = new YJ.YJEarth("app")
let Draw = new YJ.Draw.DrawPincerArrow(this.sdk)
Draw.start((a,positions)=>{
console.log(positions)
if(positions) {
let DrawAssemble = new YJ.Obj.PincerArrowObject(this.sdk, {positions: positions})
DrawAssemble.edit(true)
DrawAssemble.flyTo()
}
})
}
}
})
</script>