Skip to content

Commit 66ea931

Browse files
committed
PB-2064: fix import map with timeconfig
1 parent 3881186 commit 66ea931

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

packages/layers/src/utils/layerUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { CoordinateSystem } from '@swissgeo/coordinates'
22

33
import { servicesBaseUrl } from '@swissgeo/staging-config'
4-
import { cloneDeep, merge, omit } from 'lodash'
4+
import { cloneDeep, merge, omit, over } from 'lodash'
55
import { v4 as uuidv4 } from 'uuid'
66

77
import { DEFAULT_GEOADMIN_MAX_WMTS_RESOLUTION } from '@/config'

packages/viewer/src/modules/menu/components/activeLayers/MenuActiveLayersListItemTimeSelector.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,9 @@ const timeConfigEntriesWithYear = computed<(LayerTimeConfigEntry & { year: strin
4949
)
5050
)
5151
52-
const humanReadableCurrentTimestamp = computed<string>(() => {
53-
if (timeConfig.currentTimeEntry) {
54-
return renderHumanReadableTimestamp(
55-
timeConfig.currentTimeEntry as LayerTimeConfigEntry & { year: string }
56-
)
57-
}
58-
return ''
59-
})
52+
const humanReadableCurrentTimestamp = computed<string>(() => renderHumanReadableTimestamp(
53+
timeConfig.currentTimeEntry as LayerTimeConfigEntry & { year: string }
54+
))
6055
6156
function renderHumanReadableTimestamp(timeEntry: LayerTimeConfigEntry & { year: string }): string {
6257
if (!timeEntry || !timeEntry.year) {

packages/viewer/src/store/modules/layers/utils/loadLayerFromCapabilities.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export default async function loadLayerFromCapabilities(
6161
opacity: layer.opacity,
6262
isVisible: layer.isVisible,
6363
customAttributes: layer.customAttributes,
64+
currentYear: (layer as ExternalWMSLayer).currentYear
6465
},
6566
}
6667
)
@@ -72,6 +73,7 @@ export default async function loadLayerFromCapabilities(
7273
opacity: layer.opacity,
7374
isVisible: layer.isVisible,
7475
customAttributes: layer.customAttributes,
76+
currentYear: (layer as ExternalWMTSLayer).currentYear
7577
},
7678
})
7779
}

packages/viewer/src/store/modules/topics/actions/loadTopic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ export default function loadTopic(
7171
messages: ['Error while loading topic tree', error],
7272
})
7373
})
74-
}
74+
}

packages/viewer/src/store/plugins/storeSync/params/layers.param.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function createLayerObject(parsedLayer: Partial<Layer>, currentLayer?: La
125125
layer.opacity = parsedLayer.opacity ?? DEFAULT_OPACITY
126126

127127
if (adminId && layer.type === LayerType.KML) {
128-
;(layer as KMLLayer).adminId = adminId
128+
; (layer as KMLLayer).adminId = adminId
129129
}
130130
} else if (parsedLayer.type === LayerType.KML) {
131131
// format is KML|FILE_URL
@@ -184,7 +184,7 @@ export function createLayerObject(parsedLayer: Partial<Layer>, currentLayer?: La
184184
const internalLayer = layer as GeoAdminLayer
185185

186186
if (internalLayer.type === LayerType.GEOJSON && updateDelay !== undefined) {
187-
;(internalLayer as GeoAdminGeoJSONLayer).updateDelay = updateDelay
187+
; (internalLayer as GeoAdminGeoJSONLayer).updateDelay = updateDelay
188188
}
189189

190190
// only highlightable feature will output something, for the others a click coordinate is required

0 commit comments

Comments
 (0)