From c6df06bd690486739067ee1ee7124ac66da720fb Mon Sep 17 00:00:00 2001
From: 少年 <1392120328@qq.com>
Date: 星期二, 27 二月 2024 14:23:32 +0800
Subject: [PATCH] youhua

---
 src/utils/map.js |   61 +++++++++++++++++++-----------
 1 files changed, 39 insertions(+), 22 deletions(-)

diff --git a/src/utils/map.js b/src/utils/map.js
index f66741d..e49d709 100644
--- a/src/utils/map.js
+++ b/src/utils/map.js
@@ -4,8 +4,7 @@
 import poiLayer from '@/components/poplayer/main';
 import store from "@/utils/store";
 import { Message } from 'element-ui';
-
-let tdglLine, qiyexinxi, qysl, ydbm, ydlx, cyfx, crzt, ydmj, crnx, crnf, rjl, jzxg, jzmd;
+let tdglLine, qiyexinxi, qysl, ydbm, ydlx, cyfx, jszt, ydmj, crnx, crnf, rjl, jzxg, jzmd;
 let objdata;
 
 window.tdglLine = tdglLine
@@ -84,7 +83,6 @@
     axios
         .get(window.gisBaseUrl + '/gisserver/wfsserver/yinjing?version=1.3.0&request=GetFeature&format=json&typename=yz浜曟暟鎹�')
         .then(res => {
-            debugger
             // let manholeList = JSON.parse(res.data);
             store.setLayerPanelShow(false);
             res.data.features.forEach((item, index) => {
@@ -140,7 +138,6 @@
 //     axios
 //         .get(window.gisBaseUrl + '/gisserver/wfsserver/qiyelianqiye?version=1.3.0&request=GetFeature&format=json&typename=浼佷笟閾句紒涓�')
 //         .then(res => {
-//             debugger
 //             // let manholeList = JSON.parse(res.data);
 //             store.setLayerPanelShow(false);
 //             res.data.features.forEach((item, index) => {
@@ -183,7 +180,6 @@
     axios
         .get(window.gisBaseUrl + '/gisserver/wfsserver/YZ_SPJK_NEW_wfs?version=1.3.0&request=GetFeature&format=json&typename=鎽勫儚澶�0423')
         .then(res => {
-            debugger
             store.setLayerPanelShow(false);
             res.data.features.forEach((item, index) => {
                 window.clusterLayer.add(
@@ -451,10 +447,14 @@
             }
             // 鍦熷湴绠$悊
             if (store.tdglInfo.flag) {
+
+                console.log('鍧愭爣', [window.clickPOI.lon, window.clickPOI.lat])
+
                 axios
                     .get(
                         // "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" +
                         window.gisBaseUrl + "yzxncsApi/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" +
+                        // window.gisBaseUrl + "cs/geowinmap_xncs/ds?&lng=" +
                         window.clickPOI.lon +
                         "&lat=" +
                         window.clickPOI.lat +
@@ -502,6 +502,7 @@
                                 .get(
                                     // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" +
                                     window.gisBaseUrl + "yzxncsApi/poisearch/guihuacon/getInfo?ydbm=" +
+                                    // window.gisBaseUrl + "cs/poisearch/guihuacon/getInfo?ydbm=" +
                                     response.data.NO
                                 )
                                 .then(
@@ -518,7 +519,8 @@
                                             qiyexinxi = info.data.data.qiyexinxi;
                                             qysl = data.qiyexinxi.length;
                                             if (qysl > 0) {
-                                                ydbm = data.qiyexinxi[0]["鍦板潡缂栧彿"];
+                                                // ydbm = data.qiyexinxi[0]["鍦板潡缂栧彿"];
+                                                ydbm = data.qiyexinxi[0]["ydbh"];
                                             } else {
                                                 ydbm = data.churangxinxi["ydbh"];
                                             }
@@ -529,15 +531,15 @@
                                                 cyfx = data.yongdishuju["cyfx"];
                                             } catch (e) { }
                                             try {
-                                                // this.crzt = response.data["ZT"];
-                                                switch (response.data["ZT"]) {
-                                                    case 3:
-                                                        crzt = "宸插嚭璁�";
-                                                        break;
-                                                    case 4:
-                                                        crzt = "鏈嚭璁�";
-                                                        break;
-                                                }
+                                                jszt = response.data["ZT"];
+                                                // switch (response.data["ZT"]) {
+                                                //     case "宸插缓":
+                                                //         jszt = "宸插嚭璁�";
+                                                //         break;
+                                                //     case "鍦ㄥ缓":
+                                                //         jszt = "鏈嚭璁�";
+                                                //         break;
+                                                // }
                                             } catch (e) { }
                                             try {
                                                 ydmj = parseFloat(
@@ -564,7 +566,7 @@
                                                 ydbm,
                                                 ydlx,
                                                 cyfx,
-                                                crzt,
+                                                jszt,
                                                 ydmj,
                                                 ydbm,
                                                 crnx,
@@ -615,6 +617,10 @@
             }
             let nPickFeature = sgworld.Viewer.scene.pick(event.position);
             // console.log(nPickFeature);
+            // if (nPickFeature == undefined) {
+            //     window.flyPoint && Viewer.entities.remove(window.flyPoint);
+            //     window.flyPoint = undefined;
+            // }
             // console.log(event.position);//灞忓箷浣嶇疆
             if (!nPickFeature || !nPickFeature.id) {
                 return
@@ -660,11 +666,10 @@
                 nPickFeature.primitive.scale = 1;
                 nPickFeature.primitive.image =
                     window.SmartEarthRootUrl + "Workers/image/point.png";
-                //鐐瑰嚮寮规
-                if (nPickFeature.id.tag) {
+                //鐐瑰嚮寮规(閮ㄤ欢銆佷紒涓氥�佺洃鎺�)
+                if (nPickFeature.id.tag || nPickFeature.id.show) {
                     let properties = nPickFeature.id.properties;
                     let propertyNames = nPickFeature.id.properties.propertyNames;
-
                     if (propertyNames.indexOf("鐩戞帶鍚�") !== -1) {
                         // objdata = {
                         //     POITYPE: "SPJK",
@@ -712,11 +717,14 @@
                         return
                     } else if (propertyNames.indexOf("閮ㄤ欢鍚嶇О") !== -1) {
                         objdata = {
+                            // 鐐逛綅绫诲瀷锛堜腑鑻辨枃閰嶇疆琛╬oiKeys.js)
                             POITYPE: "CSBJ",
+                            // 灞曠ず瀛楁
                             name: properties["閮ㄤ欢鍚嶇О"]._value,
                             address: properties["瀹夎鍦板潃"]._value,
                             code: properties["閮ㄤ欢缂栫爜"]._value,
                             type: properties["閮ㄤ欢绫诲瀷"]._value,
+                            // 寮规缁忕含搴�
                             lon: lon,
                             lat: lat,
                         }
@@ -741,9 +749,15 @@
                             lon: lon,
                             lat: lat,
                         }
+                    } else if (propertyNames.includes("id")) {
+                        objdata = {
+                            POITYPE: "POINT",
+                            name: properties["_name"]._value,
+                            address: properties["_address"]._value,
+                            lat: properties["_lat"]._value,
+                            lon: properties["_lng"]._value,
+                        }
                     }
-
-
                     divPoint3 && divPoint3.deleteObject();
                     store.setPoplayerShowAction(false);
                     store.setPoplayerListAction({});
@@ -782,6 +796,7 @@
                     });
                     return;
                 }
+                // 
             }
             // if (nPickFeature.id && nPickFeature.id.name.indexOf('YINJ') != -1) {
             //     divPoint3 && divPoint3.deleteObject();
@@ -907,6 +922,8 @@
                         level: treeNode.Level,
                         minimumLevel: treeNode.minimumLevel,
                         maximumLevel: treeNode.maximumLevel,
+                        minificationFilter: Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
+                        magnificationFilter: Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR,
                         tilingScheme:
                             treeNode.tileType === "Geo"
                                 ? new Cesium.GeographicTilingScheme()
@@ -2178,4 +2195,4 @@
             clearLayerByTypeId(item);
         })
     }
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3