getOrCreateTile(z, x, y, frameState) {
    const tileCache = this.tileCache_;
    const tileLayer = this.getLayer();
    const tileSource = tileLayer.getSource();
    const cacheKey = getCacheKey(tileSource, tileSource.getKey(), z, x, y);

    /** @type {import("../../Tile.js").default} */
    let tile;

    if (tileCache.containsKey(cacheKey)) {
      tile = tileCache.get(cacheKey);
    } else {
      tile = tileSource.getTile(
        z,
        x,
        y,
        frameState.pixelRatio,
        frameState.viewState.projection,
      );
      if (!tile) {
        return null;
      }
      tileCache.set(cacheKey, tile);
    }
    return tile;
  }
Get a tile from the cache or create one if needed.

@param {number} z Tile coordinate z.
@param {number} x Tile coordinate x.
@param {number} y Tile coordinate y.
@param {import("../../Map.js").FrameState} frameState Frame state.
@return {import("../../Tile.js").default|null} Tile (or null if outside source extent).
@protected