@supermapgis/iclient-maplibregl
Version:
@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台, 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源,为用户提供了完整专业的 GIS 能力, 同时提供了优秀的可视化功能。
35 lines (26 loc) • 909 B
JavaScript
/* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
class SymbolManager {
constructor() {
this.symbols = {};//addSymbol接口添加的symbol信息
this.images = {};//在loadImage的时候存下image
}
addSymbol(id, symbol) {
symbol.layout && delete symbol.layout.visibility;
this.symbols[id] = symbol;
}
getSymbol(id) {
return this.symbols[id] && JSON.parse(JSON.stringify(this.symbols[id]));
}
removeSymbol(id) {
delete this.symbols[id];
}
addImageInfo(id, image) {
this.images[id] = image;
}
getImageInfo(id) {
return this.images[id];
}
}
export default SymbolManager;