月球大数据地理空间分析展示平台-【前端】-月球2期前端
1
Surpriseplus
2023-07-07 12ce6b636a5e83176ad09838d180adb11257077e
src/assets/js/Map/index.js
@@ -17,8 +17,9 @@
    //页面初始化
    this.earthCtrl = new SmartEarth.EarthCtrl("cesiumContainer", {
      StaticFileBaseUrl: config.StaticFileBaseUrl,
      ellipsoidCoordinates: 'MOON'
    });
    // this.earthCtrl.environment.disableAllEffect();
    this.earthCtrl.environment.disableAllEffect();
    this.Viewer = this.earthCtrl._Viewer;
@@ -38,27 +39,24 @@
    Viewer.imageryLayers.removeAll();
    Viewer.scene.globe.showGroundAtmosphere = false;
    // Viewer.scene.globe.showGroundAtmosphere = false;
    // let colorAll = {
    //   point: Cesium.Color.fromCssColorString("#ff0000"),
    //   polyline: Cesium.Color.fromCssColorString("#ffff0050"),
    //   polygon: Cesium.Color.fromCssColorString("#ffff0050"),
    // };
    // this.earthCtrl.Analysis.spaceDistance(colorAll, () => {});
    // server.AddWmtesLayer(config.moonWmts);
    var terrain = new SmartEarth.Cesium.CesiumTerrainProvider({
      url: config.moonTerrain,
      tilingScheme: new SmartEarth.Cesium.GeographicTilingScheme({
        ellipsoid: SmartEarth.Cesium.Ellipsoid.MOON,
      }),
    });
    Viewer.terrainProvider = terrain;
    Viewer.scene.globe.terrainExaggeration = 5;
    server.AddWmtesLayer(config.moonWmts);
    // var terrain = new SmartEarth.Cesium.CesiumTerrainProvider({
    //   url: config.moonTerrain,
    //   tilingScheme: new SmartEarth.Cesium.GeographicTilingScheme({
    //     ellipsoid: SmartEarth.Cesium.Ellipsoid.MOON,
    //   }),
    // });
    // Viewer.terrainProvider = terrain;
    // Viewer.scene.globe.terrainExaggeration = 5;
    // server.AddTmsLayer(config.moonTms);
    // server.AddTmsLayer("http://172.16.2.10:50001/sj_raster/v6/service/10003901/1");
    server.AddTmsLayer(config.moonTms);
    // server.AddGeoWmsLayer();