From 3255108d965897a3878e0918a444b32e086649dc Mon Sep 17 00:00:00 2001 From: JIANG Date: Wed, 31 Dec 2025 15:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96mapQueryService=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=80=BB=E8=BE=91=EF=BC=8C=E5=8A=A0=E5=BF=AB=E5=93=8D?= =?UTF-8?q?=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/mapQueryService.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/mapQueryService.ts b/src/utils/mapQueryService.ts index d023281..33ffff7 100644 --- a/src/utils/mapQueryService.ts +++ b/src/utils/mapQueryService.ts @@ -479,12 +479,16 @@ const handleMapClickSelectFeatures = async ( // 如果要素来自 VectorTileSource,需要通过 WFS 查询完整信息 const queryId = firstFeature.getProperties().id; + const layerName = firstFeature.getProperties().layer; + if (layerName === "geo_pipes" || layerName === "geo_junctions") { + layerName.concat("_mat"); + } if (!queryId) { return null; } try { - const features = await queryFeaturesByIds([queryId]); + const features = await queryFeaturesByIds([queryId], layerName); return features[0] || null; } catch (error) { console.error("查询要素详情失败:", error);