@supermapgis/iclient-maplibregl
Version:
@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台, 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源,为用户提供了完整专业的 GIS 能力, 同时提供了优秀的可视化功能。
28 lines (25 loc) • 852 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.*/
/**
* 单个符号
* @returns {Object}
* @private
*/
class SingleSymbolRender {
constructor(map) {
this.map = map;
}
/**
* 符号转换成图层
* @param {object} layer
* @param {object} symbol
* @param {string | undefined} before
*/
addLayer(layer, symbol, before) {
layer.paint && Object.assign(symbol.paint || {}, layer.paint);
layer.layout && Object.assign(symbol.layout || {}, layer.layout);
this.map.addLayerBySymbolBak({ ...layer, ...symbol }, before);
}
}
export default SingleSymbolRender;