新增 geo_valves 图层的查询;调整查询返回的元素顺序
This commit is contained in:
@@ -45,7 +45,7 @@ interface MapClickEvent {
|
|||||||
const GEOSERVER_CONFIG = {
|
const GEOSERVER_CONFIG = {
|
||||||
url: config.MAP_URL,
|
url: config.MAP_URL,
|
||||||
workspace: config.MAP_WORKSPACE,
|
workspace: config.MAP_WORKSPACE,
|
||||||
layers: ["geo_pipes_mat", "geo_junctions_mat"],
|
layers: ["geo_pipes_mat", "geo_junctions_mat", "geo_valves"],
|
||||||
wfsVersion: "1.0.0",
|
wfsVersion: "1.0.0",
|
||||||
outputFormat: "application/json",
|
outputFormat: "application/json",
|
||||||
} as const;
|
} as const;
|
||||||
@@ -460,7 +460,11 @@ const handleMapClickSelectFeatures = async (
|
|||||||
// 按几何类型优先级排序:点 > 线 > 其他
|
// 按几何类型优先级排序:点 > 线 > 其他
|
||||||
const { points, lines, others } =
|
const { points, lines, others } =
|
||||||
classifyFeaturesByGeometry(allSelectedFeatures);
|
classifyFeaturesByGeometry(allSelectedFeatures);
|
||||||
const prioritizedFeatures = [...points, ...lines, ...others];
|
const prioritizedFeatures = [
|
||||||
|
...points.reverse(),
|
||||||
|
...lines.reverse(),
|
||||||
|
...others.reverse(),
|
||||||
|
];
|
||||||
|
|
||||||
// 获取第一个要素
|
// 获取第一个要素
|
||||||
const firstFeature = prioritizedFeatures[0];
|
const firstFeature = prioritizedFeatures[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user