56 lines
1.3 KiB
HTML
56 lines
1.3 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>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%;
|
||
|
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 = new YJ.YJEarth("app")
|
||
|
|
||
|
await YJ.Global.SheetIndexStatusSwitch(sdk, true)
|
||
|
await YJ.Global.SheetIndexShangeScale(sdk, '1:100万')
|
||
|
|
||
|
YJ.Global.flyTo(sdk, {position: { lng: 86.9, lat: 27.9, alt: 9000000 }})
|
||
|
|
||
|
let layer = new YJ.Obj.ArcgisWXImagery(sdk, {
|
||
|
id: 1,
|
||
|
show: true,
|
||
|
layer_index: 1
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
</script>
|