diff --git a/assets/layers/usersettings/usersettings.json b/assets/layers/usersettings/usersettings.json
index 082cc5ab01..9e6304e4f5 100644
--- a/assets/layers/usersettings/usersettings.json
+++ b/assets/layers/usersettings/usersettings.json
@@ -724,6 +724,11 @@
"id": "debug",
"condition": "mapcomplete-show_debug=yes",
"render": "{all_tags()}"
+ },
+ {
+ "id":"debug-gps",
+ "condition": "mapcomplete-show_debug=yes",
+ "render": "{gps_all_tags()}"
}
]
}
diff --git a/src/UI/BigComponents/SelectedElementView.svelte b/src/UI/BigComponents/SelectedElementView.svelte
index c780ea931f..afa7b7d871 100644
--- a/src/UI/BigComponents/SelectedElementView.svelte
+++ b/src/UI/BigComponents/SelectedElementView.svelte
@@ -20,6 +20,11 @@
_metatags = tags
})
)
+
+
+ let knownTagRenderings = layer.tagRenderings
+ .filter(config => (config.condition?.matchesProperties($tags) ?? true) && (config.metacondition?.matchesProperties({ ...$tags, ..._metatags } ?? true)
+ && config.IsKnown($tags)))
{#if $tags._deleted === "yes"}
@@ -29,9 +34,7 @@
{:else}
- {#each layer.tagRenderings as config (config.id)}
- {#if (config.condition?.matchesProperties($tags) ?? true) && config.metacondition?.matchesProperties({ ...$tags, ..._metatags } ?? true)}
- {#if config.IsKnown($tags)}
+ {#each knownTagRenderings as config (config.id)}
- {/if}
- {/if}
{/each}
{/if}
diff --git a/src/UI/Popup/TagRendering/TagRenderingEditable.svelte b/src/UI/Popup/TagRendering/TagRenderingEditable.svelte
index 050295e9e4..27d6f09c45 100644
--- a/src/UI/Popup/TagRendering/TagRenderingEditable.svelte
+++ b/src/UI/Popup/TagRendering/TagRenderingEditable.svelte
@@ -21,7 +21,7 @@
export let editingEnabled: Store | undefined = state?.featureSwitchUserbadge
export let highlightedRendering: UIEventSource = undefined
- export let showQuestionIfUnknown: boolean = false
+ export let clss
/**
* Indicates if this tagRendering currently shows the attribute or asks the question to _change_ the property
*/
@@ -71,7 +71,7 @@
}
-
+
{#if config.question && (!editingEnabled || $editingEnabled)}
{#if editMode}
@@ -106,7 +106,7 @@
{/if}
{:else}
-
+
{/if}
diff --git a/src/UI/SpecialVisualizations.ts b/src/UI/SpecialVisualizations.ts
index feb14fc796..967448318e 100644
--- a/src/UI/SpecialVisualizations.ts
+++ b/src/UI/SpecialVisualizations.ts
@@ -77,6 +77,7 @@ import ReviewForm from "./Reviews/ReviewForm.svelte"
import Questionbox from "./Popup/TagRendering/Questionbox.svelte"
import { TagUtils } from "../Logic/Tags/TagUtils"
import Giggity from "./BigComponents/Giggity.svelte"
+import ThemeViewState from "../Models/ThemeViewState"
class NearbyImageVis implements SpecialVisualization {
// Class must be in SpecialVisualisations due to weird cyclical import that breaks the tests
@@ -1471,6 +1472,29 @@ export default class SpecialVisualizations {
return new SvelteUIElement(Giggity, { tags: tagSource, state, giggityUrl })
},
},
+ {
+ funcName: "gps_all_tags",
+ needsUrls: [],
+ docs: "Shows the current tags of the GPS-representing object, used for debugging",
+ args: [],
+ constr(
+ state: SpecialVisualizationState,
+ _: UIEventSource
>,
+ argument: string[],
+ feature: Feature,
+ layer: LayerConfig
+ ): BaseUIElement {
+ const tags = ((
+ state
+ )).geolocation.currentUserLocation.features.map(
+ (features) => features[0].properties
+ )
+ return new SvelteUIElement(AllTagsPanel, {
+ state,
+ tags,
+ })
+ },
+ },
]
specialVisualizations.push(new AutoApplyButton(specialVisualizations))