forked from MapComplete/MapComplete
Allow for a layer to not have a marker when loading from studio
This commit is contained in:
parent
4e1384c2df
commit
e6f0b8024d
1 changed files with 2 additions and 2 deletions
|
@ -139,9 +139,9 @@ export default class DetermineLayout {
|
||||||
const layerConfig = <LayerConfigJson>json
|
const layerConfig = <LayerConfigJson>json
|
||||||
const iconTr: string | TagRenderingConfigJson = <any>(
|
const iconTr: string | TagRenderingConfigJson = <any>(
|
||||||
layerConfig.pointRendering
|
layerConfig.pointRendering
|
||||||
.map((mr) => mr.marker.find((icon) => icon.icon !== undefined).icon)
|
.map((mr) => mr?.marker?.find((icon) => icon.icon !== undefined)?.icon)
|
||||||
.find((i) => i !== undefined)
|
.find((i) => i !== undefined)
|
||||||
)
|
) ?? "bug"
|
||||||
const icon = new TagRenderingConfig(iconTr).render.txt
|
const icon = new TagRenderingConfig(iconTr).render.txt
|
||||||
json = {
|
json = {
|
||||||
id: json.id,
|
id: json.id,
|
||||||
|
|
Loading…
Reference in a new issue