Fix: fix nearby drinking water fountain detection

This commit is contained in:
Pieter Vander Vennet 2024-01-22 04:29:51 +01:00
parent ddfb7988ed
commit 13ebcffab1
2 changed files with 20 additions and 14 deletions

View file

@ -258,11 +258,11 @@ class ClosestNObjectFunc implements ExtraFunction {
const maxFeatures = options?.maxFeatures ?? 1
const maxDistance = options?.maxDistance ?? 500
const uniqueTag: string | undefined = options?.uniqueTag
let allFeatures: Feature[][]
if (typeof features === "string") {
features = [features]
} else {
allFeatures = []
}
let allFeatures: Feature[][] = []
for (const spec of features) {
if (typeof spec === "string") {
const name = spec
@ -275,7 +275,12 @@ class ClosestNObjectFunc implements ExtraFunction {
allFeatures.push([spec])
}
}
}
console.log(
"Determining features which are close to",
features,
"other features:",
allFeatures
)
if (features === undefined) {
return
}

View file

@ -19,6 +19,7 @@
import { LayoutInformation } from "../Models/ThemeConfig/LayoutConfig"
import * as themeOverview from "../assets/generated/theme_overview.json"
import UnofficialThemeList from "./BigComponents/UnofficialThemeList.svelte"
import Eye from "../assets/svg/Eye.svelte"
const featureSwitches = new OsmConnectionFeatureSwitches()
const osmConnection = new OsmConnection({