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

Method addFeatures

src/mapboxgl/overlay/HeatMapLayer.js:140–153  ·  view source on GitHub ↗

* @function HeatMapLayer.prototype.addFeatures * @description 添加热点信息。 * @param {GeoJSONObject} features - 待添加的要素数组。 * * @example * var geojson = { * "type": "FeatureCollection", * "features": [ * { * "type": "feature",

(features)

Source from the content-addressed store, hash-verified

138 * map.addLayer(heatMapLayer);
139 */
140 addFeatures(features) {
141 if (this.renderer) {
142 this.renderer.addFeatures(features);
143 } else {
144 this.features = features;
145 }
146 /**
147 * @event HeatMapLayer#featuresadded
148 * @description 要素添加完成之后触发。
149 * @property {GeoJSONObject} features - 被添加的要素。
150 * @property {boolean} succeed - 要素是否成功添加。
151 */
152 this.fire(this.EVENT_TYPES[0], { features: features, succeed: true });
153 }
154
155 /**
156 * @function HeatMapLayer.prototype.refresh

Callers 1

onAddMethod · 0.45

Calls 1

fireMethod · 0.45

Tested by

no test coverage detected