} instead`
}
- if (mapping.addExtraTags !== undefined && multiAnswer) {
- throw `${ctx}: Invalid mapping: got a multi-Answer with addExtraTags; this is not allowed`
+ if(mapping.addExtraTags !== undefined && !Array.isArray(mapping.addExtraTags)){
+ throw `${ctx}.addExtraTags: expected a list, but got a ${typeof mapping.addExtraTags}`
+
}
+ if (mapping.addExtraTags !== undefined && multiAnswer) {
+ const usedKeys = mapping.addExtraTags?.flatMap(et => TagUtils.Tag(et).usedKeys())
+ if(usedKeys.some(key => TagUtils.Tag(mapping.if).usedKeys().indexOf(key ) > 0)){
+ throw `${ctx}: Invalid mapping: got a multi-Answer with addExtraTags which also modifies one of the keys; this is not allowed`
+ }
+ }
+
let hideInAnswer: boolean | TagsFilter = false
if (typeof mapping.hideInAnswer === "boolean") {
diff --git a/src/UI/Map/Icon.svelte b/src/UI/Map/Icon.svelte
index fc59cac53..5a001b6a5 100644
--- a/src/UI/Map/Icon.svelte
+++ b/src/UI/Map/Icon.svelte
@@ -36,6 +36,7 @@
import Bug from "../../assets/svg/Bug.svelte"
import Cross_bottom_right from "../../assets/svg/Cross_bottom_right.svelte"
import { Utils } from "../../Utils"
+ import Gear from "../../assets/svg/Gear.svelte"
/**
* Renders a single icon.
@@ -126,6 +127,8 @@
{:else if icon === "addSmall"}
+ {:else if icon === "gear"}
+
{:else if icon === "link"}
{:else if icon === "popout"}
diff --git a/src/UI/StudioGUI.svelte b/src/UI/StudioGUI.svelte
index f4b947961..883d17b21 100644
--- a/src/UI/StudioGUI.svelte
+++ b/src/UI/StudioGUI.svelte
@@ -278,9 +278,10 @@
-
+
Enable more options (expert mode)
MapComplete version {version}
+
{$uid}
{:else if state === "edit_layer"}
@@ -307,6 +308,7 @@
Your layers
+ Your id is {$uid}
Layers by other contributors
diff --git a/src/Utils.ts b/src/Utils.ts
index c0da44571..a22766235 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -630,7 +630,13 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
for (const key in source) {
if (key.startsWith("=")) {
- const trimmedKey = key.substr(1)
+ const trimmedKey = key.substring(1)
+ target[trimmedKey] = source[key]
+ continue
+ }
+
+ if (key.endsWith("=")) {
+ const trimmedKey = key.substring(0, key.length - 1)
target[trimmedKey] = source[key]
continue
}