Skip to content

Commit

Permalink
[Bugfix] Baselayer externalAccess
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Jul 27, 2023
1 parent ffecbca commit e7d5c53
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion assets/src/modules/config/BaseLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,16 @@ export class BaseLayersConfig {
// Override title
extendedCfg[layerCfg.name].title = layerCfg.title;
} else if ( layerCfg.externalWmsToggle ){
extendedCfg[layerCfg.name] = structuredClone(defaultCompleteBaseLayersCfg[layerCfg.externalAccess]);
// The layer config has external access parameters
if (layerCfg.externalAccess.hasOwnProperty('type')) {
// layer could be converted to XYZ or WMTS background layers
extendedCfg[layerCfg.name] = structuredClone(layerCfg.externalAccess);
} else {
extendedCfg[layerCfg.name] = Object.assign(
structuredClone(layerCfg.externalAccess),
{type: BaseLayerTypes.WMS}
);
}
} else {
extendedCfg[layerCfg.name] = {
"type": BaseLayerTypes.Lizmap,
Expand Down

0 comments on commit e7d5c53

Please sign in to comment.