提交
This commit is contained in:
60
example/加载mbtiles.html
Normal file
60
example/加载mbtiles.html
Normal file
@ -0,0 +1,60 @@
|
||||
<!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,
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
await YJ.on({host: 'http://localhost:8891'})
|
||||
this.createEarth()
|
||||
// window.arcgis = new YJ.Obj.ArcgisWXImagery(this.sdk)
|
||||
// window.gd = new YJ.Obj.GDLWImagery(this.sdk)
|
||||
await this.mbtiles()
|
||||
|
||||
},
|
||||
methods: {
|
||||
createEarth() {
|
||||
this.sdk = new YJ.YJEarth("app")
|
||||
},
|
||||
mbtiles() {
|
||||
|
||||
window.layer = new YJ.Obj.Layer(this.sdk, {
|
||||
id: "c899a83e726e77c21c7221ff24c80ba5",
|
||||
show: true,
|
||||
layer_index: 2
|
||||
})
|
||||
layer.on()
|
||||
//卫星影响
|
||||
let layer2 = new YJ.Obj.ArcgisWXImagery(this.sdk, {
|
||||
id: 123,
|
||||
show: true,
|
||||
layer_index: 6
|
||||
})
|
||||
console.log(layer2)
|
||||
},
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
Reference in New Issue
Block a user