Do not require projection extent for x-wrapping tile sources

This commit is contained in:
Andreas Hocevar
2015-07-03 11:05:49 +02:00
parent c0b6eefd8f
commit da66a37182
4 changed files with 37 additions and 2 deletions

View File

@@ -231,7 +231,7 @@ ol.source.Tile.prototype.getTileCoordForTileUrlFunction =
opt_projection : this.getProjection();
var tileGrid = this.getTileGridForProjection(projection);
goog.asserts.assert(!goog.isNull(tileGrid), 'tile grid needed');
if (this.getWrapX() && projection.canWrapX()) {
if (this.getWrapX() && projection.isGlobal()) {
tileCoord = ol.tilecoord.wrapX(tileCoord, tileGrid, projection);
}
return ol.tilecoord.withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;