getTileCoordForTileUrlFunction(tileCoord, projection) {
    const gridProjection =
      projection !== undefined ? projection : this.getProjection();
    const tileGrid =
      projection !== undefined
        ? this.getTileGridForProjection(gridProjection)
        : this.tileGrid || this.getTileGridForProjection(gridProjection);
    if (this.getWrapX() && gridProjection.isGlobal()) {
      tileCoord = wrapX(tileGrid, tileCoord, gridProjection);
    }
    return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;
  }
Returns a tile coordinate wrapped around the x-axis. When the tile coordinate
is outside the resolution and extent range of the tile grid, `null` will be
returned.
@param {import("../tilecoord.js").TileCoord} tileCoord Tile coordinate.
@param {import("../proj/Projection.js").default} [projection] Projection.
@return {import("../tilecoord.js").TileCoord} Tile coordinate to be passed to the tileUrlFunction or
    null if no tile URL should be created for the passed `tileCoord`.