Skip to content

Commit c1f3b05

Browse files
committed
BGDIINF_SB-2978: Updates according to comments
1 parent 14dcc55 commit c1f3b05

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/modules/map/components/cesium/CesiumWMSLayer.vue

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export default {
9494
}),
9595
{
9696
show: this.wmsLayerConfig.visible,
97+
alpha: this.opacity,
9798
}
9899
)
99100
},

src/modules/map/components/cesium/CesiumWMTSLayer.vue

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default {
6262
}),
6363
{
6464
show: this.wmtsLayerConfig.visible,
65+
alpha: this.opacity,
6566
}
6667
)
6768
},

src/utils/layerUtils.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,19 @@ export class ActiveLayerConfig {
2525
* @returns {String | string | LayerTimeConfig.currentTimeEntry.timestamp}
2626
*/
2727
export function getTimestampFromConfig(config, previewYear) {
28-
const isWMTS = config instanceof GeoAdminWMTSLayer
2928
if (config.timeConfig) {
3029
// if there is a preview year set, we search for the matching timestamp
31-
if (previewYear && config.timeConfig.years.includes(previewYear) && isWMTS) {
30+
if (previewYear && config.timeConfig.years.includes(previewYear)) {
3231
const matchingTimeEntry = config.timeConfig.getTimeEntryForYear(previewYear)
33-
if (matchingTimeEntry || isWMTS) {
32+
if (matchingTimeEntry) {
3433
return matchingTimeEntry.timestamp
3534
}
3635
}
3736
// if a time entry is defined, and is different from 'all'
3837
// (no need to pass 'all' to our WMS, that's the default timestamp used under the hood)
39-
if (config.timeConfig.currentYear !== YEAR_TO_DESCRIBE_ALL_OR_CURRENT_DATA && !isWMTS) {
38+
if (config.timeConfig.currentYear !== YEAR_TO_DESCRIBE_ALL_OR_CURRENT_DATA) {
4039
return config.timeConfig.currentTimestamp
4140
}
4241
}
43-
return isWMTS ? null : ''
42+
return config instanceof GeoAdminWMTSLayer ? null : ''
4443
}

0 commit comments

Comments
 (0)