创建新仓库
This commit is contained in:
53
static/example/加载mbtiles.html
Normal file
53
static/example/加载mbtiles.html
Normal file
@ -0,0 +1,53 @@
|
||||
<!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:8894"})
|
||||
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")
|
||||
},
|
||||
async mbtiles() {
|
||||
//卫星影响
|
||||
window.layer = new YJ.Obj.Layer(this.sdk, {
|
||||
id: "2cbdd12621a25f89b5a180cf7af84685",
|
||||
show: true,
|
||||
})
|
||||
await layer.on()
|
||||
layer.flyTo()
|
||||
},
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
Reference in New Issue
Block a user