创建任务

This commit is contained in:
mmc
2026-05-25 12:52:02 +08:00
parent a23f7e19aa
commit f86e4a2800
2 changed files with 195 additions and 76 deletions

View File

@@ -355,21 +355,17 @@ 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);
}
function getLayerBoundsAndFit(wmsUrl, layerName) {
console.log('=== 获取图层范围开始 ===');
console.log('参数:', { wmsUrl, layerName });
const getCapabilitiesUrl = `${wmsUrl}?service=WMS&version=1.1.1&request=GetCapabilities`;
console.log('GetCapabilities URL:', getCapabilitiesUrl);
fetch(getCapabilitiesUrl)
.then(response => response.text())
.then(xmlText => {
console.log('GetCapabilities响应:', xmlText);
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlText, 'text/xml');
const layerElements = xmlDoc.getElementsByTagName('Layer');
@@ -435,7 +431,6 @@ 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);
//}