1
Surpriseplus
2022-09-19 543249cc7d5dd38b9415f40e71fd576dcfc006de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<template>
  <div id="mapdiv"></div>
</template>
 
<script>
export default {
  name: "",
  data() {
    return {};
  },
  mounted() {
    this.init3DMap();
  },
  methods: {
    init3DMap() {
      window.sgworld = new SmartEarth.SGWorld("mapdiv", {
        url: "/SmartEarthSDK/Workers/image/earth.jpg",
        licenseServer: "http://192.168.20.39/LFServer",
      });
      window.Viewer = sgworld._Viewer;
      sgworld.Navigate.Stop(); //取消飞行状态
      sgworld.Navigate.jumpTo({
        //跳转视角
        destination: new Cesium.Cartesian3.fromDegrees(110, 32, 8000000),
      });
      //显示fps
      sgworld._Viewer.scene.debugShowFramesPerSecond = false;
      sgworld.navControl("enableCompass", false);
      //sgworld.navControl("enableDistanceLegend", false);
    },
  },
};
</script>
 
<style scoped>
#mapdiv {
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  position: relative;
}
</style>