geocoded_image)
@@ -118,7 +118,7 @@
zoomToFeatures: true,
onClick: (feature) => {
highlighted.set(feature.properties.id)
- },
+ }
})
ShowDataLayer.showMultipleLayers(map, new StaticFeatureSource([feature]), state.theme.layers)
@@ -141,8 +141,14 @@
layer: geocodedImageLayer,
onClick: (feature) => {
highlighted.set(feature.properties.id)
- },
+ }
})
+ onDestroy(tags.addCallbackAndRunD(tags => {
+ if (tags.id.startsWith("node/") || tags.id.startsWith("way/") || tags.id.startsWith("relation/")) {
+ return
+ }
+ linkable = false
+ }))
diff --git a/src/UI/Popup/DisabledQuestions.svelte b/src/UI/Popup/DisabledQuestions.svelte
index 0e2d0587f..1b36a7633 100644
--- a/src/UI/Popup/DisabledQuestions.svelte
+++ b/src/UI/Popup/DisabledQuestions.svelte
@@ -3,15 +3,17 @@
import { Stores } from "../../Logic/UIEventSource"
import Tr from "../Base/Tr.svelte"
import Translations from "../i18n/Translations"
+ import type { SpecialVisualizationState } from "../SpecialVisualization"
+ import ThemeViewState from "../../Models/ThemeViewState"
/**
* Shows _all_ disabled questions
*/
- export let state
- let layers = state.layout.layers.filter((l) => l.isNormal())
+ export let state: ThemeViewState
+ let layers = state.theme.layers.filter((l) => l.isNormal())
let allDisabled = Stores.concat(
- layers.map((l) => state.userRelatedState.getThemeDisabled(state.layout.id, l.id))
+ layers.map((l) => state.userRelatedState.getThemeDisabled(state.theme.id, l.id))
).map((l) => [].concat(...l))
const t = Translations.t.general.questions
diff --git a/src/UI/Popup/DisabledQuestionsLayer.svelte b/src/UI/Popup/DisabledQuestionsLayer.svelte
index 6b4509349..6460f2fac 100644
--- a/src/UI/Popup/DisabledQuestionsLayer.svelte
+++ b/src/UI/Popup/DisabledQuestionsLayer.svelte
@@ -2,7 +2,6 @@
/**
* Gives an overview of questions which are disabled for the given theme
*/
- import UserRelatedState from "../../Logic/State/UserRelatedState"
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
import ThemeViewState from "../../Models/ThemeViewState"
import Tr from "../Base/Tr.svelte"
@@ -13,7 +12,7 @@
export let layer: LayerConfig
export let state: ThemeViewState
- let disabledQuestions = state.userRelatedState.getThemeDisabled(state.layout.id, layer.id)
+ let disabledQuestions = state.userRelatedState.getThemeDisabled(state.theme.id, layer.id)
function getQuestion(id: string): Translation {
return layer.tagRenderings.find((q) => q.id === id).question.Subs({})
diff --git a/src/UI/SpecialVisualization.ts b/src/UI/SpecialVisualization.ts
index 2accea518..e021daad3 100644
--- a/src/UI/SpecialVisualization.ts
+++ b/src/UI/SpecialVisualization.ts
@@ -1,18 +1,13 @@
import { Store, UIEventSource } from "../Logic/UIEventSource"
import BaseUIElement from "./BaseUIElement"
import ThemeConfig from "../Models/ThemeConfig/ThemeConfig"
-import {
- FeatureSource,
- IndexedFeatureSource,
- WritableFeatureSource,
-} from "../Logic/FeatureSource/FeatureSource"
+import { FeatureSource, IndexedFeatureSource, WritableFeatureSource } from "../Logic/FeatureSource/FeatureSource"
import { OsmConnection } from "../Logic/Osm/OsmConnection"
import { Changes } from "../Logic/Osm/Changes"
import { ExportableMap, MapProperties } from "../Models/MapProperties"
import LayerState from "../Logic/State/LayerState"
import { Feature, Geometry, Point, Polygon } from "geojson"
import FullNodeDatabaseSource from "../Logic/FeatureSource/TiledFeatureSource/FullNodeDatabaseSource"
-import { MangroveIdentity } from "../Logic/Web/MangroveReviews"
import { GeoIndexedStoreForLayer } from "../Logic/FeatureSource/Actors/GeoIndexedStore"
import LayerConfig from "../Models/ThemeConfig/LayerConfig"
import FeatureSwitchState from "../Logic/State/FeatureSwitchState"
@@ -22,14 +17,12 @@ import { ImageUploadManager } from "../Logic/ImageProviders/ImageUploadManager"
import FavouritesFeatureSource from "../Logic/FeatureSource/Sources/FavouritesFeatureSource"
import { ProvidedImage } from "../Logic/ImageProviders/ImageProvider"
import GeoLocationHandler from "../Logic/Actors/GeoLocationHandler"
-import { SummaryTileSourceRewriter } from "../Logic/FeatureSource/TiledFeatureSource/SummaryTileSource"
import ThemeSource from "../Logic/FeatureSource/Sources/ThemeSource"
import { Map as MlMap } from "maplibre-gl"
import ShowDataLayer from "./Map/ShowDataLayer"
import { CombinedFetcher } from "../Logic/Web/NearbyImagesSearch"
import SearchState from "../Logic/State/SearchState"
-import UserRelatedState, { OptionallySyncedHistory } from "../Logic/State/UserRelatedState"
-import GeocodeResult from "./Search/GeocodeResult.svelte"
+import UserRelatedState from "../Logic/State/UserRelatedState"
import FeaturePropertiesStore from "../Logic/FeatureSource/Actors/FeaturePropertiesStore"
/**
diff --git a/src/UI/SpecialVisualizations.ts b/src/UI/SpecialVisualizations.ts
index 92979445e..489d2e107 100644
--- a/src/UI/SpecialVisualizations.ts
+++ b/src/UI/SpecialVisualizations.ts
@@ -112,7 +112,7 @@ class NearbyImageVis implements SpecialVisualization {
{
name: "readonly",
required: false,
- doc: "If 'readonly', will not show the 'link'-button",
+ doc: "If 'readonly' or 'yes', will not show the 'link'-button",
},
]
docs =
@@ -128,7 +128,7 @@ class NearbyImageVis implements SpecialVisualization {
layer: LayerConfig
): SvelteUIElement {
const isOpen = args[0] === "open"
- const readonly = args[1] === "readonly"
+ const readonly = args[1] === "readonly" || args[1] === "yes"
const [lon, lat] = GeoOperations.centerpointCoordinates(feature)
return new SvelteUIElement(isOpen ? NearbyImages : NearbyImagesCollapsed, {
tags,
@@ -744,13 +744,14 @@ export default class SpecialVisualizations {
required: false,
},
],
- constr: (state, tags, args) => {
+ constr: (state, tags, args, feature) => {
const targetKey = args[0] === "" ? undefined : args[0]
const noBlur = args[3]?.toLowerCase()?.trim()
return new SvelteUIElement(UploadImage, {
state,
tags,
targetKey,
+ feature,
labelText: args[1],
image: args[2],
noBlur: noBlur === "true" || noBlur === "yes",