Files
sdk4_demo/example/分析-淹没.html

61 lines
1.3 KiB
HTML
Raw Normal View History

2025-07-03 15:12:58 +08:00
<!--
* @name:
* @author: zh
* @date: Do not edit
* @update: Do not edit
* @description:
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<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,
submerge: null
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
async createEarth() {
window.sdk = await new YJ.YJEarth("app")
// let terrain = await new YJ.Obj.Terrain(window.sdk, {
// url: "http://localhost:8888/yjearth4.0/data/pak/1aa55c41643a44e079c4a6af03fd301c"
// })
this.tileset = new YJ.Obj.Tileset(sdk, {
show: true,
name: 'xxx',
url: "http://43.142.48.85:15000/模型/倾斜模型json/tileset.json",
position: { lng: 140, lat: 40, alt: 2000 }
})
await this.tileset.on()
this.tileset.flyTo()
this.submerge = new YJ.Analysis.Submerge(window.sdk);
console.log(this.submerge)
},
}
})
</script>