* @private * @function WebMap.prototype.createGraphicLayer * @description 添加大数据图层到地图上 * @param {Object} layerInfo - 图层信息 * @param {Array} features - feature的集合 * @return {ol.layer.image} 大数据图层
(layerInfo, features)
| 3218 | * @return {ol.layer.image} 大数据图层 |
| 3219 | */ |
| 3220 | async createGraphicLayer(layerInfo, features) { |
| 3221 | features = layerInfo.filterCondition ? this.getFiterFeatures(layerInfo.filterCondition, features) : features; |
| 3222 | let graphics = await this.getGraphicsFromFeatures(features, layerInfo.style, layerInfo.featureType); |
| 3223 | let source = new GraphicSource({ |
| 3224 | graphics: graphics, |
| 3225 | render: 'canvas', |
| 3226 | map: this.map, |
| 3227 | isHighLight: false |
| 3228 | }); |
| 3229 | return new olLayer.Image({ |
| 3230 | source: source |
| 3231 | }); |
| 3232 | } |
| 3233 | |
| 3234 | /** |
| 3235 | * @private |
no test coverage detected