Surpriseplus
2022-10-17 16fbbddb45ec387f359358da77f81bfbbb3644fc
src/components/mapsdk.vue
@@ -4,7 +4,7 @@
<script>
export default {
  name: "",
  name: '',
  data() {
    return {};
  },
@@ -13,9 +13,9 @@
  },
  methods: {
    init3DMap() {
      window.sgworld = new SmartEarth.SGWorld("mapdiv", {
        url: "/SmartEarthSDK/Workers/image/earth.jpg",
        licenseServer: "http://192.168.20.39/LFServer",
      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(); //取消飞行状态
@@ -25,8 +25,19 @@
      });
      //显示fps
      sgworld._Viewer.scene.debugShowFramesPerSecond = false;
      sgworld.navControl("enableCompass", false);
      //mpt添加
      var option = {
        url: 'http://183.162.245.49:82/SG/Elevation',
        layerName: 'zhufeng.397336.mpt',
        requestVertexNormals: true,
      };
      sgworld.Creator.sfsterrainprovider('', option, '', true, '');
      //导航控件
      document.getElementById('distanceLegendDiv').style.display = 'none';
      //比例尺
      sgworld.navControl('enableCompass', false);
      //sgworld.navControl("enableDistanceLegend", false);
      setTimeout(() => {}, 10000);
    },
  },
};