Skip to content

Commit

Permalink
Ajout des options de preload sur les tuiles (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
lowzonenose authored Sep 27, 2024
1 parent 7906311 commit 2262afe
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/carte/Layer/Layer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,24 @@ onMounted(() => {
opacity : props.layerOptions.opacity,
gray : props.layerOptions.gray
};
// ajout des options de preload par defaut
var preload = {
preload : Infinity,
cacheSize : 1024
};
switch (service) {
case "WMS":
layer.value = new GeoportalWMS({
layer : name,
configuration : value,
olParams : options
olParams : Object.assign(options, preload)
});
break;
case "WMTS":
layer.value = new GeoportalWMTS({
layer : name,
configuration : value,
olParams : options
olParams : Object.assign(options, preload)
});
break;
case "TMS":
Expand Down

0 comments on commit 2262afe

Please sign in to comment.