月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-07-03 acaf0e90887fa217ff9aec6d0f25af5ec5e237a9
src/assets/js/Map/index.js
@@ -16,39 +16,39 @@
    );
    //页面初始化
    this.earthCtrl = new SmartEarth.EarthCtrl("cesiumContainer", {
      licenseServer: "https://cim.smartearth.cn/",
      StaticFileBaseUrl: "/CIMSDK/",
      StaticFileBaseUrl: config.StaticFileBaseUrl,
    });
    // this.earthCtrl.environment.disableAllEffect();
    this.Viewer = this.earthCtrl._Viewer;
    this.Viewer.scene.skyAtmosphere.show = false;
    this.Viewer.scene.globe.depthTestAgainstTerrain = true;
    console.log(this.earthCtrl);
    console.log(SmartEarth.EarthCtrl);
    window.earthCtrl = this.earthCtrl;
    window.Viewer = this.earthCtrl._Viewer;
    window.Cesium = SmartEarth.Cesium;
    // debugger;
    Viewer.imageryLayers.removeAll();
    Viewer.scene.globe.showGroundAtmosphere = false;
    // let colorAll = {
    //   point: SmartEarth.Cesium.Color.fromCssColorString("#ff0000"),
    //   polyline: SmartEarth.Cesium.Color.fromCssColorString("#ffff0050"),
    //   polygon: SmartEarth.Cesium.Color.fromCssColorString("#ffff0050"),
    //   point: Cesium.Color.fromCssColorString("#ff0000"),
    //   polyline: Cesium.Color.fromCssColorString("#ffff0050"),
    //   polygon: Cesium.Color.fromCssColorString("#ffff0050"),
    // };
    // this.earthCtrl.Analysis.spaceDistance(colorAll, () => {});
    // 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.AddWmtesLayer(config.moonWmts);
    // var param = {
    //     name: labelName,
    //     id: earthCtrl.factory.createUUID(),
@@ -61,8 +61,10 @@
    //     alt: 10
    // };
    // labelEntity = earthCtrl.factory.createLabel(param);
    server.AddTmsLayer(config.moonTms);
    // server.AddTmsLayer(config.moonTms);
    server.AddGeoWmsLayer();
    // server.AddTmsLayer('http://localhost:8080/abc');
    // earthCtrl.camera.flyTo(47.5087, 23.6963, 300, 9.5, -45, 0.0, 5);