Add option to force loading of a layer, even if it is hidden + automatically set this flag is another layer depends on this layer

This commit is contained in:
Pieter Vander Vennet 2022-02-07 01:59:07 +01:00
parent ad2f7b2bd6
commit 0f95891a47
6 changed files with 28 additions and 7 deletions

View file

@ -27,7 +27,7 @@ export default class DynamicTileSource implements TileHierarchy<FeatureSourceFor
this.loadedTiles = new Map<number, FeatureSourceForLayer & Tiled>()
const neededTiles = state.locationControl.map(
location => {
if (!layer.isDisplayed.data) {
if (!layer.isDisplayed.data && !layer.layerDef.forceLoad) {
// No need to download! - the layer is disabled
return undefined;
}