选择工具开发一半, 修改新建图层顺序名称

This commit is contained in:
李志鹏
2025-11-07 16:25:41 +08:00
parent 0e565eb0d5
commit 7c340e0cb8
13 changed files with 2198 additions and 8 deletions

View File

@@ -910,6 +910,17 @@ export class LayerManager {
return layer;
}
/**
* 根据name获取图层
* @param {string} layerName 图层名称
* @returns {Object|null} 图层对象或null
*/
getLayerByName(layerName) {
const layer = this.layers.value.find((layer) => layer.name === layerName);
return layer || null;
}
/**
* 获取当前图层对象的列表
* @param {string} layerId 可选指定图层ID默认使用当前活动图层