Merge pull request #6988 from ahocevar/vectortile-types

Add missing type annotations
This commit is contained in:
Andreas Hocevar
2017-07-06 16:53:23 +02:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -260,7 +260,7 @@ ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate = functi
} else {
tileSpaceCoordinate = coordinate;
}
replayGroup = sourceTile.getReplayGroup(tile.tileCoord);
replayGroup = sourceTile.getReplayGroup(tile.tileCoord.toString());
found = found || replayGroup.forEachFeatureAtCoordinate(
tileSpaceCoordinate, resolution, rotation, hitTolerance, {},
/**

View File

@@ -48,6 +48,10 @@ ol.VectorTile = function(tileCoord, state, src, format, tileLoadFunction) {
*/
this.projection_;
/**
* @private
* @type {Object.<string, ol.render.ReplayGroup>}
*/
this.replayGroups_ = {};
/**
@@ -117,6 +121,10 @@ ol.VectorTile.prototype.getProjection = function() {
};
/**
* @param {string} key Key.
* @return {ol.render.ReplayGroup} Replay group.
*/
ol.VectorTile.prototype.getReplayGroup = function(key) {
return this.replayGroups_[key];
};
@@ -173,6 +181,10 @@ ol.VectorTile.prototype.setProjection = function(projection) {
};
/**
* @param {string} key Key.
* @param {ol.render.ReplayGroup} replayGroup Replay group.
*/
ol.VectorTile.prototype.setReplayGroup = function(key, replayGroup) {
this.replayGroups_[key] = replayGroup;
};