Use wrapped tile coord for getting feature at coordinate
This commit is contained in:
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user