提交
This commit is contained in:
65
example/方里网.html
Normal file
65
example/方里网.html
Normal file
@ -0,0 +1,65 @@
|
||||
<!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 {
|
||||
display: flex;
|
||||
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")
|
||||
let Measure = new YJ.Measure.MeasureDistance(window.sdk)
|
||||
Measure.start()
|
||||
let layer = new YJ.Obj.GDWXImagery(window.sdk, {
|
||||
id: 1,
|
||||
show: true,
|
||||
layer_index: 1
|
||||
})
|
||||
new YJ.Obj.GDLWImagery(window.sdk, {
|
||||
id: 2,
|
||||
show: true,
|
||||
layer_index: 2
|
||||
})
|
||||
// let terrain = await new YJ.Obj.Terrain(window.sdk, {
|
||||
// url: "http://localhost:8891/yjearth4.0/data/pak/1aa55c41643a44e079c4a6af03fd301c"
|
||||
// })
|
||||
|
||||
YJ.Global.FlwStatusSwitch(window.sdk, true) // 方里网
|
||||
// YJ.Global.JwwStatusSwitch(window.sdk, true) // 经纬网
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
Reference in New Issue
Block a user