Files
4.0/static/example/加载mbtiles.html

54 lines
1.2 KiB
HTML
Raw Permalink Normal View History

2025-07-03 17:39:09 +08:00
<!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>