/*
* @Author: 叶思铧(292184)
* @Date: 2022-08-26 09:33:16
* @Descripttion:后端聚合图层的临时管控方法
* @LastEditors: yesihua
* @LastEditTime: 2022-08-26 10:33:46
*/
class ServerLayerControl {
/**
*
* @param {Object} map ol 初始化形成的实例map
* @param {Object} layer 后端聚合时生成的图层
*/
constructor(map, layer) {
this.map = map
this.layer = layer
//选中高亮的id
this.selIds = []
//选中高亮的要素集合
this.selFeatures = []
}
/**
* 设置选中的id
* 设置需要变更样式的ids,因后端聚合历史问题,这里有和其他地方耦合了,调整慎重
* @param {Array} ids
*/
setSelIds(ids) {
//时间问题待定
this.selIds = ids
this.refresh()
}
//刷新图层
refresh() {
this.layer.getSource().refresh()
}
}
export default ServerLayerControl
ServerLayerControl
最新推荐文章于 2024-08-14 15:45:18 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)