Files
sdk4_demo/example/鹰眼图.html

54 lines
1.2 KiB
HTML
Raw Normal View History

2025-07-03 15:12:58 +08:00
<!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">
<button class="button" @Click="open">显示</button>
<button class="button" @Click="close">隐藏</button>
</div>
</body>
</html>
<script>
new Vue({
el: "#app",
data: {
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
createEarth() {
window.sdk = new YJ.YJEarth("app")
YJ.Global.CesiumContainer(sdk, {
// compass: true, // 罗盘
// legend: true, // 比例尺
// info: true, // 信息栏
frame: true // 刷新率
})
},
open() {
YJ.Global.MapX.open(sdk)
},
close() {
YJ.Global.MapX.close(sdk)
}
}
})
</script>