Return rather than fail if resolution is not defined

This commit is contained in:
Paul Spencer
2014-08-12 20:27:17 -04:00
parent 4fb905170a
commit fb242b5316

View File

@@ -89,9 +89,11 @@ ol.source.Cluster.prototype.onSourceChange_ = function() {
* @private
*/
ol.source.Cluster.prototype.cluster_ = function() {
if (!goog.isDef(this.resolution_)) {
return;
}
goog.array.clear(this.features_);
var extent = ol.extent.createEmpty();
goog.asserts.assert(goog.isDef(this.resolution_));
var mapDistance = this.distance_ * this.resolution_;
var features = this.source_.getFeatures();