From a616aa5017406f851abfda3a3e446feed3f10e60 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期二, 27 二月 2024 17:26:53 +0800 Subject: [PATCH] 接口更新 --- src/utils/map.js | 61 ++++++++++++++++++++---------- 1 files changed, 40 insertions(+), 21 deletions(-) diff --git a/src/utils/map.js b/src/utils/map.js index 048a329..4224b84 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 + "BEApi/cs/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 + @@ -501,7 +501,8 @@ axios .get( // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + - window.gisBaseUrl + "yzxncsApi/poisearch/guihuacon/getInfo?ydbm=" + + window.gisBaseUrl + "BEApi/cs/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, @@ -614,7 +616,11 @@ }) } let nPickFeature = sgworld.Viewer.scene.pick(event.position); - console.log(nPickFeature); + // 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 @@ -661,7 +667,7 @@ 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) { @@ -711,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, } @@ -739,6 +748,14 @@ DZ: properties["DZ"]._value, 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(); @@ -905,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() @@ -2176,4 +2195,4 @@ clearLayerByTypeId(item); }) } -} \ No newline at end of file +} -- Gitblit v1.9.3