Files
sdk4_demo/example/分析-通视.html

62 lines
1.5 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/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">
<button class="button" @Click="analysis">分析</button>
<button class="button" @Click="clear">清除</button>
</div>
</body>
</html>
<script>
new Vue({
el: "#app",
data: {
},
async mounted() {
await YJ.on()
await this.createEarth()
},
methods: {
async createEarth() {
this.sdk = new YJ.YJEarth("app")
window.sdk = this.sdk
let terrain = await new YJ.Obj.Terrain(this.sdk, {
url: "http://localhost:8891/yjearth4.0/data/pak/1aa55c41643a44e079c4a6af03fd301c"
})
let layer = new YJ.Obj.ArcgisWXImagery(this.sdk, {
id: 123,
show: true,
layer_index: 1
})
this.visibility = new YJ.Analysis.Visibility(this.sdk)
},
analysis() {
this.visibility = new YJ.Analysis.Visibility(this.sdk)
},
clear() {
console.log(YJ.Analysis)
YJ.Analysis.Clear();
}
}
})
</script>