Resolved issue with cluster source reloading
The cluster source was not reloading when a map was panned, only when the resolution changed.
This commit is contained in:
@@ -77,10 +77,10 @@ ol.source.Cluster.prototype.getSource = function() {
|
||||
*/
|
||||
ol.source.Cluster.prototype.loadFeatures = function(extent, resolution,
|
||||
projection) {
|
||||
this.source_.loadFeatures(extent, resolution, projection);
|
||||
if (resolution !== this.resolution_) {
|
||||
this.clear();
|
||||
this.resolution_ = resolution;
|
||||
this.source_.loadFeatures(extent, resolution, projection);
|
||||
this.cluster_();
|
||||
this.addFeatures(this.features_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user