From 1d2d21e18580e159743087a3ebedd5fe1a633739 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期日, 08 十月 2023 11:20:48 +0800 Subject: [PATCH] 撤回 --- src/api/api.js | 9 ++------- src/assets/js/rpc.js | 45 ++++----------------------------------------- 2 files changed, 6 insertions(+), 48 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index bd00ca1..c5ee2d1 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -22,14 +22,9 @@ "/gisserver/rest/services/Locators/dikuaixinxi1005/GeocodeServer/findAddressCandidates?singleLine=" + params ); } + //鑾峰彇鍦板潡鑼冨洿 -export function getLandBorder(lon, lat) { - return request.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=" + lon + "&lat=" + lat + "&geom=true&requesttype=json" - ) -} -// 鑾峰彇鍥尯鑼冨洿 -export function getParkBorder(lon, lat) { +export function getDiKuanFanWei(lon, lat) { return request.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=" + lon + "&lat=" + lat + "&geom=true&requesttype=json" ) diff --git a/src/assets/js/rpc.js b/src/assets/js/rpc.js index ffbf4d7..8667074 100644 --- a/src/assets/js/rpc.js +++ b/src/assets/js/rpc.js @@ -5,8 +5,7 @@ import { liushisijiayuanqudizhibianmafuwu, findAddressCandidates, - getLandBorder, - getParkBorder, + getDiKuanFanWei, ent_selectByName } from "../../api/api"; import vueEvents from "@/utils/vueEvent.js"; @@ -179,40 +178,8 @@ // 鏄剧ず鍦板潡鑼冨洿 getLandmass(res) { let that = this; - getLandBorder(res.lon, res.lat).then(response => { - let center = { lon: 0, lat: 0 }; - let polygon = that.read(response.geometry); - if (polygon.length > 0) { - var geometry = []; - let points = polygon[0].split(","); - for (let i = 0; i < points.length; i++) { - let point = points[i].replace(/^\s+|\s+$/g, "").split(" "); - center.lon += parseFloat(point[0]) / points.length; - center.lat += parseFloat(point[1]) / points.length; - geometry.push({ - x: parseFloat(point[0]), - y: parseFloat(point[1]), - z: 0 - }); - } - if (that.lacationLine) { - sgworld.Creator.DeleteObject(that.lacationLine); - that.lacationLine = null; - } - that.lacationLine = sgworld.Creator.createPolyline( - geometry, - "#ff0000", - 1, - 0, - "绾�" - ); - } - }); - }, - // 鏄剧ず鍥尯鑼冨洿 - getPark(res) { - let that = this; - getParkBorder(res.lon, res.lat).then(response => { + // 鍒掔嚎 + getDiKuanFanWei(res.lon, res.lat).then(response => { let center = { lon: 0, lat: 0 }; let polygon = that.read(response.geometry); if (polygon.length > 0) { @@ -530,11 +497,7 @@ //娣诲姞瀹氫綅寮圭獥 this.setAddPointLocation(objdata); //鑼冨洿璋冪敤 - if (res.type == '鍥尯') { - this.getPark(res) - } else if (res.type == '鍦板潡') { - this.getLandmass(res); - } + this.getLandmass(res); }, setAddPointLocation(res) { -- Gitblit v1.9.3