This commit is contained in:
zh
2025-07-03 15:12:58 +08:00
parent 17d900dcf9
commit fd55e022ae
2395 changed files with 510211 additions and 0 deletions

56
example/导入kml.html Normal file
View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<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">
<button class="button" @Click="importKml">导入kml</button>
</div>
</body>
</html>
<script>
new Vue({
el: "#app",
data: {
PointObject: null,
PolylineObject: null
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
async createEarth() {
window.sdk = await new YJ.YJEarth("app")
},
importKml() {
this.PolylineObject = new YJ.Obj.KML(window.sdk, {
id: '235346546',
url: './kml/1748250107948.kml'
})
this.PolylineObject.on()
}
}
})
</script>