Skip to content

Commit 80419c7

Browse files
committed
Add ”cacheSize“ property for ol.mapsuite.VectorTileLayer.
1 parent c2d6e67 commit 80419c7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/layer/GeoVectorTileLayer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class GeoVectorTileLayer extends VectorTileLayer {
3131
options["declutter"] = options["declutter"] === undefined ? true : options["declutter"];
3232
options["defaultStyle"] = options["defaultStyle"] === undefined ? false : options["defaultStyle"];
3333
options["minimalist"] = options["minimalist"] === undefined ? true : options["minimalist"];
34+
options["cacheSize"] = options["cacheSize"] === undefined ? 64 : options["cacheSize"];
3435
super(options);
3536
this.multithread = options.multithread == undefined ? true : options.multithread
3637
this.backgroundWorkerCount = options.backgroundWorkerCount == undefined ? 1 : options.backgroundWorkerCount;
@@ -42,6 +43,7 @@ class GeoVectorTileLayer extends VectorTileLayer {
4243
this.clientSecret = options["clientSecret"];
4344
this.apiKey = options["apiKey"];
4445
this.defaultStyle = options["defaultStyle"];
46+
this.cacheSize = options["cacheSize"];
4547

4648
if (this.multithread && window.Worker) {
4749
this.workerManager = new WorkerManager();
@@ -235,7 +237,7 @@ class GeoVectorTileLayer extends VectorTileLayer {
235237
format: format,
236238
projection: "EPSG:3857",
237239
tileGrid: this.createVectorTileGrid(),
238-
cacheSize: 128,
240+
cacheSize: this.cacheSize,
239241
multithread: this.multithread,
240242
minimalist: this.minimalist,
241243
maxDataZoom: this.maxDataZoom

0 commit comments

Comments
 (0)