Files
sdk4_demo/example/分析-等高线全球.html

67 lines
1.4 KiB
HTML
Raw Permalink 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%;
margin: 0;
}
#app {
width: 100%;
height: 100vh;
}
</style>
</head>
<body>
<div id="app" class="fullSize">
</div>
</body>
</html>
<script>
new Vue({
el: "#app",
data: {
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
async createEarth() {
window.sdk = await new YJ.YJEarth("app")
let terrain = await new YJ.Obj.Terrain(sdk, {
url: "http://localhost:8891/yjearth4.0/data/pak/1aa55c41643a44e079c4a6af03fd301c"
})
YJ.Global.CesiumContainer(sdk, {
compass: true, // 罗盘
legend: true, // 比例尺
info: true, // 信息栏
frame: true // 刷新率
})
let layer = new YJ.Obj.ArcgisWXImagery(sdk, {
id: 123,
show: true,
layer_index: 1
})
YJ.Global.Contour(sdk)
}
}
})
</script>