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