This commit is contained in:
zh
2025-07-03 15:12:58 +08:00
parent 17d900dcf9
commit fd55e022ae
2395 changed files with 510211 additions and 0 deletions

98
example/矢量军标.html Normal file
View File

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>矢量军标测试</title>
<!-- <script src="https://cesium.com/downloads/cesiumjs/releases/1.117/Build/Cesium/Cesium.js"></script> -->
<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 type="module">
new Vue({
el: "#app",
data: {
sx: 2,
sy: 2,
angle: 0,
hierarchys: []
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
async createEarth() {
window.sdk = await new YJ.YJEarth("app")
sdk.tabHide = ['属性信息']
YJ.Global.MouseRightMenu(sdk, true, (text, object) => {
console.log(text, object)
switch (text) {
case 'rotateAround':
YJ.Global.rotateAround(sdk, object.position)
break
case 'edit':
break
}
})
let openLeftClick = YJ.Global.openLeftClick(sdk)
let openRightClick = YJ.Global.openRightClick(sdk)
YJ.Global.MouseRightMenu(sdk, true, (text, object) => {
console.log(text, object)
switch (text) {
case '绕中心点旋转':
YJ.Global.rotateAround(sdk, object.position)
break
case '属性':
break
}
})
let options = {
position: { lng: 100, lat: 50 },
scale: { x: 1, y: 1 },
angle: 60,
flipe: {
x: false,
y: false
},
url: './image/军标完整svg/3、联合作战部署与行动/(三) 联合作战行动SVG/电子对抗兵群阵地.svg',
show: true,
text: {
color: "#ffffff",
far: 100000,
fontSize: 20,
near: 0,
position: { lng: 6.3520615009048536, lat: 11.275651340673484, alt: 54.531848106892376 },
scaleByDistance: true,
value: "1111"
}
}
window.svg = new YJ.Obj.GroundSvg(sdk, options)
svg.load(() => {
svg.drag(true, (v) => {
console.log(v)
})
svg.edit(true)
})
},
}
})
</script>