Use wrapped tile coord for getting feature at coordinate

This commit is contained in:
Tim Schaub
2017-11-06 09:57:58 -07:00
parent 8a6fe81f09
commit dbeef9f73e
2 changed files with 2 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate = functi
var tile, tileCoord, tileExtent;
for (i = 0, ii = renderedTiles.length; i < ii; ++i) {
tile = renderedTiles[i];
tileCoord = tile.tileCoord;
tileCoord = tile.wrappedTileCoord;
tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);
bufferedExtent = ol.extent.buffer(tileExtent, hitTolerance * resolution, bufferedExtent);
if (!ol.extent.containsCoordinate(bufferedExtent, coordinate)) {

View File

@@ -1,5 +1,3 @@
goog.require('ol');
goog.require('ol.obj');
goog.require('ol.Feature');
@@ -305,6 +303,7 @@ describe('ol.renderer.canvas.VectorTileLayer', function() {
this.tileKeys = [key];
this.sourceTiles_ = {};
this.sourceTiles_[key] = sourceTile;
this.wrappedTileCoord = arguments[0];
};
ol.inherits(TileClass, ol.VectorImageTile);