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:
cmiles74
2015-07-22 09:18:41 -04:00
parent 49cc39c4dd
commit 89b62cd53b

View File

@@ -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_);
}