Fix: linking images is not possible for notes or non-openstreetmap elements

This commit is contained in:
Pieter Vander Vennet 2024-12-06 01:07:30 +01:00
parent 378f55b544
commit 7f9f7e7534
3 changed files with 20 additions and 13 deletions

View file

@ -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,