Better type checking in ol.Map
This commit is contained in:
+1
-1
@@ -92,7 +92,7 @@ oli.FrameState.prototype.postRenderFunctions;
|
|||||||
oli.FrameState.prototype.size;
|
oli.FrameState.prototype.size;
|
||||||
|
|
||||||
|
|
||||||
/** @type {Object} */
|
/** @type {Object.<string, boolean>} */
|
||||||
oli.FrameState.prototype.skippedFeaturesHash_;
|
oli.FrameState.prototype.skippedFeaturesHash_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+9
-4
@@ -372,7 +372,7 @@ ol.Map = function(options) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hash of features uid to skip drawing.
|
* Hash of features uid to skip drawing.
|
||||||
* @type {Object}
|
* @type {Object.<string, boolean>}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
this.skippedFeaturesHash_ = {};
|
this.skippedFeaturesHash_ = {};
|
||||||
@@ -939,9 +939,14 @@ ol.Map.prototype.handleSizeChanged_ = function() {
|
|||||||
*/
|
*/
|
||||||
ol.Map.prototype.handleSkippedFeaturesChange_ = function() {
|
ol.Map.prototype.handleSkippedFeaturesChange_ = function() {
|
||||||
this.skippedFeaturesHash_ = {};
|
this.skippedFeaturesHash_ = {};
|
||||||
this.skippedFeatures_.forEach(function(feature) {
|
this.skippedFeatures_.forEach(
|
||||||
this.skippedFeaturesHash_[goog.getUid(feature).toString()] = true;
|
/**
|
||||||
}, this);
|
* @param {ol.Feature} feature Feature.
|
||||||
|
* @this {ol.Map}
|
||||||
|
*/
|
||||||
|
function(feature) {
|
||||||
|
this.skippedFeaturesHash_[goog.getUid(feature).toString()] = true;
|
||||||
|
}, this);
|
||||||
this.render();
|
this.render();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user