From 6fb4e4cbfbd295c4d34c223f51491108f9087f58 Mon Sep 17 00:00:00 2001 From: mmc <1556375442@qq.com> Date: Wed, 20 May 2026 15:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=20=20=E6=9C=8D=E5=8A=A1=20?= =?UTF-8?q?=20=E5=9C=B0=E5=9D=80=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Map.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/Map.jsx b/src/components/Map.jsx index 15c5f4a..150c9d2 100644 --- a/src/components/Map.jsx +++ b/src/components/Map.jsx @@ -307,7 +307,8 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices = } function fetchPublishedLayers() { - const baseUrl = 'https://gis.caasrobot.com/geoserver'; + const baseUrl = "http://192.168.2.59:7000/geoserver"; + //const baseUrl = 'https://gis.caasrobot.com/geoserver'; const getCapabilitiesUrl = `${baseUrl}/wms?service=WMS&version=1.1.1&request=GetCapabilities`; fetch(getCapabilitiesUrl) @@ -352,6 +353,7 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices = const [workspace, layerName] = layerFullName.split(':'); if (!workspace || !layerName) return; const wmsUrl = `${baseUrl}/wms`; + console.log("addLayerFromList", wmsUrl, workspace, layerName, index) addWmsLayerToCesium(wmsUrl, workspace, layerName, index); } @@ -431,6 +433,10 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices = const layerIdentifier = `${workspace}:${layerName}`; let baseUrl = wmsUrl; const cesiumLayers = []; + console.log(wmsUrl, workspace, layerName, index, "wmsUrl, workspace, layerName, index") + //if (index == 2) { + // flyToLayer(layerIdentifier, baseUrl); + //} //getLayerBoundsAndFit(wmsUrl, layerName); if (baseUrl.includes('/gwc/service/wms')) { @@ -754,9 +760,6 @@ export default function CesiumMap({ realtimePosition, pathPoints = [], devices = const validPositions = []; - // ============================== - // 设备遍历 - // ============================== devices.forEach((device, index) => {