MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / createGraphicLayer

Method createGraphicLayer

src/openlayers/mapping/WebMap.js:3220–3232  ·  view source on GitHub ↗

* @private * @function WebMap.prototype.createGraphicLayer * @description 添加大数据图层到地图上 * @param {Object} layerInfo - 图层信息 * @param {Array} features - feature的集合 * @return {ol.layer.image} 大数据图层

(layerInfo, features)

Source from the content-addressed store, hash-verified

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

Callers 1

addLayerMethod · 0.95

Calls 2

getFiterFeaturesMethod · 0.95

Tested by

no test coverage detected