Kaynağa Gözat

常规提交

sunzehao 1 hafta önce
ebeveyn
işleme
299e1cf1b3
1 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 6 4
      src/views/cesiumComponents/windMap3D.vue

+ 6 - 4
src/views/cesiumComponents/windMap3D.vue

@@ -249,9 +249,9 @@ export default {
     // 初始化底图
     async initCesiumBaseMapImage() {
       const imageryProvider = await new Cesium.UrlTemplateImageryProvider({
-        // url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
+        url: "https://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
         // url: "http://localhost:3007/tiles/map/{z}/{x}/{y}",
-        url: "/static/ditu/{z}/{x}/{y}.png",
+        // url: "/static/ditu/{z}/{x}/{y}.png",
         // minimumLevel: 11,
         maximumLevel: 24,
         credit: "影像地图",
@@ -345,9 +345,11 @@ export default {
 
     // 初始化地形
     async initCesiumTerrain() {
+        let stationName = this.$route.query.nameEn;
       const terrainProvider = await Cesium.CesiumTerrainProvider.fromUrl(
         // "http://localhost:3007/tiles/dixing",
-        "/static/dixing",
+        // stationName === "MYFDC" ? "/static/hnay" : "/static/wlcb",
+        "/static/hnay",
         {
           requestWaterMask: true, // 如果需要水效果,设置为true
           requestVertexNormals: true, // 如果需要光照效果,设置为true
@@ -660,7 +662,7 @@ export default {
           verticalOrigin: Cesium.VerticalOrigin.BOTTOM, // 原来已经是CENTER,现在改为BOTTOM
           pixelOffset: new Cesium.Cartesian2(80, -50), // 原来是-20,现在改为30,向上移动
           eyeOffset: new Cesium.Cartesian3(0, 0, 0), // 保持固定大小
-          heightReference: Cesium.HeightReference.NONE,
+          heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
           scaleByDistance: new Cesium.NearFarScalar(
             6000, // 5010米内
             1.2, // 1倍大小