Merge pull request #12671 from tschaub/cacheless

Configure cache on the layer instead of the source
This commit is contained in:
Tim Schaub
2021-08-28 15:01:01 -06:00
committed by GitHub
5 changed files with 48 additions and 21 deletions

View File

@@ -23,7 +23,6 @@ import {getUid} from '../util.js';
* @property {import("../tilegrid/TileGrid.js").default} [tileGrid] Tile grid.
* @property {boolean} [opaque=false] Whether the layer is opaque.
* @property {import("./State.js").default} [state] The source state.
* @property {number} [cacheSize] Number of tiles to retain in the cache.
* @property {number} [tilePixelRatio] Tile pixel ratio.
* @property {boolean} [wrapX=true] Render tiles beyond the antimeridian.
* @property {number} [transition] Transition time when fading in new tiles (in miliseconds).
@@ -56,7 +55,7 @@ class DataTileSource extends TileSource {
}
super({
cacheSize: options.cacheSize,
cacheSize: 0.1, // don't cache on the source
projection: projection,
tileGrid: tileGrid,
opaque: options.opaque,