diff --git a/src/utils/mapQueryService.ts b/src/utils/mapQueryService.ts index 47d8e46..d023281 100644 --- a/src/utils/mapQueryService.ts +++ b/src/utils/mapQueryService.ts @@ -45,7 +45,7 @@ interface MapClickEvent { const GEOSERVER_CONFIG = { url: config.MAP_URL, workspace: config.MAP_WORKSPACE, - layers: ["geo_pipes_mat", "geo_junctions_mat"], + layers: ["geo_pipes_mat", "geo_junctions_mat", "geo_valves"], wfsVersion: "1.0.0", outputFormat: "application/json", } as const; @@ -460,7 +460,11 @@ const handleMapClickSelectFeatures = async ( // 按几何类型优先级排序:点 > 线 > 其他 const { points, lines, others } = classifyFeaturesByGeometry(allSelectedFeatures); - const prioritizedFeatures = [...points, ...lines, ...others]; + const prioritizedFeatures = [ + ...points.reverse(), + ...lines.reverse(), + ...others.reverse(), + ]; // 获取第一个要素 const firstFeature = prioritizedFeatures[0];