Better type definition
Fixes the `Invalid type(s) for operator IN.` warnings from the closure compiler.
This commit is contained in:
@@ -164,7 +164,7 @@ LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.
|
||||
* @param {!Object.<string, !Object.<string, ol.TileRange>>} usedTiles Used tiles.
|
||||
* @param {ol.source.Tile} tileSource Tile source.
|
||||
* @param {number} z Z.
|
||||
* @param {ol.TileRange} tileRange Tile range.
|
||||
|
||||
@@ -32,7 +32,7 @@ const MapRenderer = function(container, map) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Object.<string, ol.renderer.Layer>}
|
||||
* @type {!Object.<string, ol.renderer.Layer>}
|
||||
*/
|
||||
this.layerRenderers_ = {};
|
||||
|
||||
|
||||
@@ -253,14 +253,13 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi
|
||||
const resolution = frameState.viewState.resolution;
|
||||
const rotation = frameState.viewState.rotation;
|
||||
const layer = /** @type {ol.layer.Vector} */ (this.getLayer());
|
||||
/** @type {Object.<string, boolean>} */
|
||||
/** @type {!Object.<string, boolean>} */
|
||||
const features = {};
|
||||
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution,
|
||||
rotation, hitTolerance, {},
|
||||
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
const key = getUid(feature).toString();
|
||||
if (!(key in features)) {
|
||||
|
||||
@@ -265,7 +265,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
|
||||
const rotation = frameState.viewState.rotation;
|
||||
hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;
|
||||
const layer = this.getLayer();
|
||||
/** @type {Object.<string, boolean>} */
|
||||
/** @type {!Object.<string, boolean>} */
|
||||
const features = {};
|
||||
|
||||
/** @type {Array.<ol.VectorImageTile>} */
|
||||
@@ -290,8 +290,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
|
||||
continue;
|
||||
}
|
||||
replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
|
||||
found = found || replayGroup.forEachFeatureAtCoordinate(
|
||||
coordinate, resolution, rotation, hitTolerance, {},
|
||||
found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
|
||||
/**
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
|
||||
@@ -143,7 +143,7 @@ WebGLVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordin
|
||||
const viewState = frameState.viewState;
|
||||
const layer = this.getLayer();
|
||||
const layerState = this.layerState_;
|
||||
/** @type {Object.<string, boolean>} */
|
||||
/** @type {!Object.<string, boolean>} */
|
||||
const features = {};
|
||||
return this.replayGroup_.forEachFeatureAtCoordinate(coordinate,
|
||||
context, viewState.center, viewState.resolution, viewState.rotation,
|
||||
|
||||
Reference in New Issue
Block a user