From 5473a26c0c3c8bcaae90ad2f8f65f04a1b1f7d47 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 04 Jan 2022 16:48:27 +0800
Subject: [PATCH] 模型

---
 src/components/mobilemap/index.vue |   83 ++++++++++++++++++++++-------------------
 1 files changed, 44 insertions(+), 39 deletions(-)

diff --git a/src/components/mobilemap/index.vue b/src/components/mobilemap/index.vue
index 1f4245d..8fa8151 100644
--- a/src/components/mobilemap/index.vue
+++ b/src/components/mobilemap/index.vue
@@ -322,12 +322,9 @@
       //精细模型↓
       const tilesetLayer = new that.DC.TilesetLayer("tilesetLayer");
       viewer.addLayer(tilesetLayer);
-      const tileset = new that.DC.Tileset(
-        "http://data.mars3d.cn/3dtiles/max-shihua/tileset.json",
-        {
-          luminanceAtZenith: 0.5,
-        }
-      );
+      const tileset = new that.DC.Tileset("/mx/tileset.json", {
+        luminanceAtZenith: 0.5,
+      });
       tilesetLayer.addOverlay(tileset);
       // tilesetLayer.show = false;
 
@@ -373,6 +370,7 @@
             name: e.layer._bid,
             address: e.layer.type,
             introduce: e.layer._id,
+            data: e,
           }
         );
         //高亮
@@ -433,36 +431,39 @@
       // 2.5D贴图↓
       let usetowpointfive = () => {
         var provider =
-          new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
-            url: "http://www.tdtfz.com/OneMapServer/rest/services/fzsw2019/MapServer/WMTS/tile/1.0.0/fzsw2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}",
-            layer: "fzsw2019",
-            style: "default",
-            tileMatrixSetID: "default028mm",
-            format: "image/jpgpng",
-            tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
-            maximumLevel: 19,
-            tileMatrixLabels: [
-              "0",
-              "1",
-              "2",
-              "3",
-              "4",
-              "5",
-              "6",
-              "7",
-              "8",
-              "9",
-              "10",
-              "11",
-              "12",
-              "13",
-              "14",
-              "15",
-              "16",
-              "17",
-              "18",
-              "19",
-            ],
+          // new that.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({
+          //   url: "http://www.tdtfz.com/OneMapServer/rest/services/fzsw2019/MapServer/WMTS/tile/1.0.0/fzsw2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}",
+          //   layer: "fzsw2019",
+          //   style: "default",
+          //   tileMatrixSetID: "default028mm",
+          //   format: "image/jpgpng",
+          //   tilingScheme: new that.DC.Namespace.Cesium.GeographicTilingScheme(),
+          //   maximumLevel: 19,
+          //   tileMatrixLabels: [
+          //     "0",
+          //     "1",
+          //     "2",
+          //     "3",
+          //     "4",
+          //     "5",
+          //     "6",
+          //     "7",
+          //     "8",
+          //     "9",
+          //     "10",
+          //     "11",
+          //     "12",
+          //     "13",
+          //     "14",
+          //     "15",
+          //     "16",
+          //     "17",
+          //     "18",
+          //     "19",
+          //   ],
+          // });
+          new that.DC.Namespace.Cesium.ArcGisMapServerImageryProvider({
+            url: "http://arcgis.jxpskj.com:6080/arcgis/rest/services/PingXiang25DMapDN/MapServer",
           });
         return viewer.imageryLayers.addImageryProvider(provider);
       };
@@ -515,7 +516,9 @@
           //   new DC.Position(115.86798885, 28.72502592, 2100, 0, -45)
           // );
           let doit = (int) => {
-            if (val == 1) {
+            if (int == "建模") {
+              viewer.flyTo(tileset);
+            } else if (val == 1) {
               viewer.camera.setView({
                 // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州
                 // fromDegrees()方法,将经纬度和高程转换为世界坐标
@@ -551,9 +554,11 @@
               });
             }
           };
+          // [116.36618337, 27.95911915, 2000.0]
           that.dimension == "2.5D"
-            ? doit([116.36618337, 27.95911915, 2000.0])
-            : doit([117.08513731, 31.64790556, 600.0]);
+            ? doit([114.03928791, 27.62954732, 360.0])
+            : // : doit([116.39038494750986, 39.902393222208644, 330.0]);
+              doit("建模");
         };
         // startPoint(1);
       }

--
Gitblit v1.9.3