Do requested changes 2/3 to cluster source

This commit is contained in:
Maximilian Kroeg
2020-02-27 10:00:41 +01:00
parent b25fc6741e
commit f18b78d2da

View File

@@ -29,7 +29,7 @@ import VectorSource from './Vector.js';
* ```
* See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster
* calculation point for polygons.
* @property {VectorSource} [source=null] Source.
* @property {VectorSource} [source] Source.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
*/
@@ -150,7 +150,7 @@ class Cluster extends VectorSource {
}
this.source = source;
if (source) {
this.sourceListenKey_ = source.addEventListener(EventType.CHANGE, this.boundRefresh_);
source.addEventListener(EventType.CHANGE, this.boundRefresh_);
}
this.refresh();
}