Add more translations

pull/260/head
Candid Dauth 2024-04-06 13:18:56 +02:00
rodzic 1d82cfa7c3
commit c6a89d111d
18 zmienionych plików z 788 dodań i 302 usunięć

Wyświetl plik

@ -64,7 +64,7 @@
"stroke-description": "Kontur der Linie ({{solid}} (durchgezogen) / {{dashed}} (gestrichelt) / {{dotted}} (gepunktet))",
"distance-description": "Länge der Linie in Kilometern",
"time-description": "Reisedauer der Linie in Sekunden",
"ascent-descent-description": "Gesamteranstieg/-abstieg der Linie",
"ascent-descent-description": "Aufstieg/-abstieg der Linie",
"routePoints-description": "Koordinaten der Wegpunkte der Linie",
"number-description": "Zahl",
"text-description": "Zeichenkette",
@ -236,11 +236,63 @@
"legend-content": {
"click-explanation": "Klicken Sie, um Objekte dieses Typs zu verstecken/anzuzeigen."
},
"line-info": {
"delete-line-title": "Linie löschen",
"delete-line-message": "Wollen Sie die Linie „{{name}}“ wirklich löschen?",
"delete-line-ok": "Löschen",
"delete-line-error": "Fehler beim Löschen der Linie",
"save-line-error": "Fehler beim Speichern der Linie",
"move-line-title": "Linie bewegen",
"move-line-message": "Benutzen Sie das Routenformular oder ziehen Sie die Linie, um den Routenverlauf zu ändern. Klicken Sie auf „Speichern“, um den neuen Verlauf abzuspeichern.",
"move-line-finish": "Speichern",
"move-line-cancel": "Abbrechen",
"hide-elevation-plot": "Höhenprofil verstecken",
"show-elevation-plot": "Höhenprofil anzeigen",
"distance": "Länge",
"ascent-descent": "Aufstieg/-abstieg",
"edit-data": "Bearbeiten",
"edit-waypoints": "Bewegen",
"delete": "Löschen"
},
"marker-info": {
"delete-marker-title": "Marker löschen",
"delete-marker-message": "Wollen Sie den Marker „{{name}}“ wirklich löschen?",
"delete-marker-ok": "Löschen",
"delete-marker-error": "Fehler beim Löschen des Markers",
"coordinates": "Koordinaten",
"edit-data": "Bearbeiten",
"move": "Bewegen",
"delete": "Löschen"
},
"multiple-info": {
"delete-objects-title_one": "{{count}} Objekt löschen",
"delete-objects-title_other": "{{count}} Objekte löschen",
"delete-objects-message_one": "Wollen Sie wirklich {{count}} Objekt löschen?",
"delete-objects-message_other": "Wollen Sie wirklich {{count}} Objekte löschen?",
"delete-objects-ok": "Löschen",
"delete-objects-error": "Fehler beim Löschen der Objekte",
"zoom-to-object": "Zum Objekt zoomen",
"zoom": "Zoomen",
"show-details": "Details anzeigen",
"details": "Details",
"delete": "Löschen"
},
"modal-dialog": {
"close": "Schließen",
"cancel": "Abbrechen",
"save": "Speichern"
},
"overpass-form": {
"filter": "Filtern…",
"custom-explanation-1": "Geben Sie hier eine {{statement}} ein. Die Einstellungen und das {{out}}-Ausgabeformat werden im Hintergrund automatisch gesetzt. Für Wege und Relationen werden statt Linien oder Polygonen Marker in der geometrischen Mitte angezeigt.",
"custom-explanation-1-interpolation-statement": "Overpass-Query-Anweisung",
"custom-explanation-1-interpolation-statement-url": "https://wiki.openstreetmap.org/wiki/DE:Overpass_API/Overpass_QL#Query-Anweisung",
"custom-explanation-2": "Beispielanweisungen sind {{parking}}, um Kfz-Parkplätze anzuzeigen und {{atm}} für Geldautomaten.",
"custom-query": "Benutzerdefinierte Anweisung"
},
"overpass-form-tab": {
"pois": "POIs"
},
"user-preferences-dialog": {
"title": "Benutzereinstellungen",
"introduction": "Diese Einstellungen werden als Cookies auf Ihrem Computer gespeichert und werden unabhängig von der geöffneten Karte angewendet.",

Wyświetl plik

@ -64,7 +64,7 @@
"stroke-description": "Line stroke ({{solid}} (solid) / {{dashed}} / {{dotted}})",
"distance-description": "Line distance in kilometers",
"time-description": "Line routing time in seconds",
"ascent-descent-description": "Total ascent/descent of line",
"ascent-descent-description": "Total climb/drop of line",
"routePoints-description": "Line point coordinates",
"number-description": "Numerical value",
"text-description": "Text value",
@ -236,11 +236,63 @@
"legend-content": {
"click-explanation": "Click to show/hide objects of this type."
},
"line-info": {
"delete-line-title": "Delete line",
"delete-line-message": "Do you really want to delete the line “{{name}}”?",
"delete-line-ok": "Delete",
"delete-line-error": "Error deleting line",
"save-line-error": "Error saving line",
"move-line-title": "Edit waypoints",
"move-line-message": "Use the routing form or drag the line around to change it. Click “Finish” to save the changes.",
"move-line-finish": "Finish",
"move-line-cancel": "Cancel",
"hide-elevation-plot": "Hide elevation plot",
"show-elevation-plot": "Show elevation plot",
"distance": "Distance",
"ascent-descent": "Climb/drop",
"edit-data": "Edit data",
"edit-waypoints": "Edit waypoints",
"delete": "Delete"
},
"marker-info": {
"delete-marker-title": "Delete marker",
"delete-marker-message": "Do you really want to delete the marker “{{name}}”?",
"delete-marker-ok": "Delete",
"delete-marker-error": "Error deleting marker",
"coordinates": "Coordinates",
"edit-data": "Edit data",
"move": "Move",
"delete": "Delete"
},
"multiple-info": {
"delete-objects-title_one": "Delete {{count}} object",
"delete-objects-title_other": "Delete {{count}} objects",
"delete-objects-message_one": "Do you really want to remove {{count}} object?",
"delete-objects-message_other": "Do you really want to remove {{count}} objects?",
"delete-objects-ok": "Delete",
"delete-objects-error": "Error deleting objects",
"zoom-to-object": "Zoom to object",
"zoom": "Zoom",
"show-details": "Show details",
"details": "Details",
"delete": "Delete"
},
"modal-dialog": {
"close": "Close",
"cancel": "Cancel",
"save": "Save"
},
"overpass-form": {
"filter": "Filter…",
"custom-explanation-1": "Enter an {{statement}} here. Settings and an {{out}} statement are added automatically in the background. For ways and relations, a marker will be shown at the geometric centre, no lines or polygons are drawn.",
"custom-explanation-1-interpolation-statement": "Overpass query statement",
"custom-explanation-1-interpolation-statement-url": "https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#The_Query_Statement",
"custom-explanation-2": "Example queries are {{parking}} to get parking places or {{atm}} for ATMs.",
"custom-query": "Custom query"
},
"overpass-form-tab": {
"pois": "POIs"
},
"user-preferences-dialog": {
"title": "User preferences",
"introduction": "These settings are stored on your computer as a cookie and are applied independently of the opened map.",

Wyświetl plik

@ -14,12 +14,14 @@
import ZoomToObjectButton from "../ui/zoom-to-object-button.vue";
import { injectContextRequired, requireClientContext, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
import ExportDropdown from "../ui/export-dropdown.vue";
import { useI18n } from "../../utils/i18n";
const context = injectContextRequired();
const client = requireClientContext(context);
const mapContext = requireMapContext(context);
const toasts = useToasts();
const i18n = useI18n();
const props = withDefaults(defineProps<{
lineId: ID;
@ -48,10 +50,10 @@
toasts.hideToast(`fm${context.id}-line-info-delete`);
if (!await showConfirm({
title: "Delete line",
message: `Do you really want to delete the line “${normalizeLineName(line.value.name)}”?`,
title: i18n.t("line-info.delete-line-title"),
message: i18n.t("line-info.delete-line-message", { name: normalizeLineName(line.value.name) }),
variant: "danger",
okLabel: "Delete"
okLabel: i18n.t("line-info.delete-line-ok")
}))
return;
@ -60,7 +62,7 @@
try {
await client.value.deleteLine({ id: props.lineId });
} catch (err) {
toasts.showErrorToast(`fm${context.id}-line-info-delete`, "Error deleting line", err);
toasts.showErrorToast(`fm${context.id}-line-info-delete`, i18n.t("line-info.delete-line-error"), err);
} finally {
isDeleting.value = false;
}
@ -92,7 +94,7 @@
if(save)
await client.value.editLine({ id: line.value.id, routePoints: route.routePoints, mode: route.mode });
} catch (err) {
toasts.showErrorToast(`fm${context.id}-line-info-move-error`, "Error saving line", err);
toasts.showErrorToast(`fm${context.id}-line-info-move-error`, i18n.t("line-info.save-line-error"), err);
} finally {
mapContext.value.components.map.fire('fmInteractionEnd');
isMoving.value = false;
@ -106,17 +108,17 @@
}
};
toasts.showToast(`fm${context.id}-line-info-move`, `Edit waypoints`, "Use the routing form or drag the line around to change it. Click “Finish” to save the changes.", {
toasts.showToast(`fm${context.id}-line-info-move`, i18n.t("line-info.move-line-title"), i18n.t("line-info.move-line-message"), {
noCloseButton: true,
actions: [
{ label: "Finish", variant: "primary", onClick: () => { void done(true); }},
{ label: "Cancel", onClick: () => { void done(false); } }
{ label: i18n.t("line-info.move-line-finish"), variant: "primary", onClick: () => { void done(true); }},
{ label: i18n.t("line-info.move-line-cancel"), onClick: () => { void done(false); } }
]
});
isMoving.value = true;
} catch (err) {
toasts.showErrorToast(`fm${context.id}-line-info-move-error`, "Error saving line", err);
toasts.showErrorToast(`fm${context.id}-line-info-move-error`, i18n.t("line-info.save-line-error"), err);
toasts.hideToast(`fm${context.id}-line-info-move`);
mapContext.value.components.map.fire('fmInteractionEnd');
@ -150,20 +152,20 @@
class="btn btn-secondary"
:class="{ active: showElevationPlot }"
@click="showElevationPlot = !showElevationPlot"
v-tooltip.right="`${showElevationPlot ? 'Hide' : 'Show'} elevation plot`"
v-tooltip.right="showElevationPlot ? i18n.t('line-info.hide-elevation-plot') : i18n.t('line-info.show-elevation-plot')"
>
<Icon icon="chart-line" :alt="`${showElevationPlot ? 'Hide' : 'Show'} elevation plot`"></Icon>
<Icon icon="chart-line" :alt="showElevationPlot ? i18n.t('line-info.hide-elevation-plot') : i18n.t('line-info.show-elevation-plot')"></Icon>
</button>
</div>
</div>
<div class="fm-search-box-collapse-point" v-if="!isMoving">
<dl class="fm-search-box-dl">
<dt class="distance">Distance</dt>
<dt class="distance">{{i18n.t("line-info.distance")}}</dt>
<dd class="distance">{{formatDistance(line.distance)}} <span v-if="line.time != null">({{formatRouteTime(line.time, line.mode)}})</span></dd>
<template v-if="line.ascent != null">
<dt class="elevation">Climb/drop</dt>
<dt class="elevation">{{i18n.t("line-info.ascent-descent")}}</dt>
<dd class="elevation"><ElevationStats :route="line"></ElevationStats></dd>
</template>
@ -199,7 +201,7 @@
size="sm"
@click="showEditDialog = true"
:disabled="isDeleting || mapContext.interaction"
>Edit data</button>
>{{i18n.t("line-info.edit-data")}}</button>
<button
v-if="!client.readonly && line.mode != 'track'"
@ -207,7 +209,7 @@
class="btn btn-secondary btn-sm"
@click="moveLine()"
:disabled="isDeleting || mapContext.interaction"
>Edit waypoints</button>
>{{i18n.t("line-info.edit-waypoints")}}</button>
<button
v-if="!client.readonly"
@ -217,7 +219,7 @@
:disabled="isDeleting || mapContext.interaction"
>
<div v-if="isDeleting" class="spinner-border spinner-border-sm"></div>
Delete
{{i18n.t("line-info.delete")}}
</button>
</div>

Wyświetl plik

@ -13,11 +13,13 @@
import ZoomToObjectButton from "../ui/zoom-to-object-button.vue";
import { injectContextRequired, requireClientContext, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
import type { RouteDestination } from "../facil-map-context-provider/route-form-tab-context";
import { useI18n } from "../../utils/i18n";
const context = injectContextRequired();
const client = requireClientContext(context);
const mapContext = requireMapContext(context);
const toasts = useToasts();
const i18n = useI18n();
const props = withDefaults(defineProps<{
markerId: ID;
@ -46,10 +48,10 @@
toasts.hideToast(`fm${context.id}-marker-info-delete`);
if (!await showConfirm({
title: "Delete marker",
message: `Do you really want to delete the marker “${normalizeMarkerName(marker.value.name)}”?`,
title: i18n.t("marker-info.delete-marker-title"),
message: i18n.t("marker-info.delete-marker-message", { name: normalizeMarkerName(marker.value.name) }),
variant: "danger",
okLabel: "Delete"
okLabel: i18n.t("marker-info.delete-marker-ok")
}))
return;
@ -58,7 +60,7 @@
try {
await client.value.deleteMarker({ id: props.markerId });
} catch (err) {
toasts.showErrorToast(`fm${context.id}-marker-info-delete`, "Error deleting marker", err);
toasts.showErrorToast(`fm${context.id}-marker-info-delete`, i18n.t("marker-info.delete-marker-error"), err);
} finally {
isDeleting.value = false;
}
@ -88,7 +90,7 @@
</span>
</h2>
<dl class="fm-search-box-collapse-point fm-search-box-dl">
<dt class="pos">Coordinates</dt>
<dt class="pos">{{i18n.t("marker-info.coordinates")}}</dt>
<dd class="pos"><Coordinates :point="marker" :ele="marker.ele"></Coordinates></dd>
<template v-for="field in client.types[marker.typeId].fields" :key="field.name">
@ -116,14 +118,14 @@
class="btn btn-secondary btn-sm"
@click="showEditDialog = true"
:disabled="isDeleting || mapContext.interaction"
>Edit data</button>
>{{i18n.t("marker-info.edit-data")}}</button>
<button
v-if="!client.readonly"
type="button"
class="btn btn-secondary btn-sm"
@click="move()"
:disabled="isDeleting || mapContext.interaction"
>Move</button>
>{{i18n.t("marker-info.move")}}</button>
<button
v-if="!client.readonly"
type="button"
@ -132,7 +134,7 @@
:disabled="isDeleting || mapContext.interaction"
>
<div v-if="isDeleting" class="spinner-border spinner-border-sm"></div>
Delete
{{i18n.t("marker-info.delete")}}
</button>
</div>

Wyświetl plik

@ -11,12 +11,14 @@
import ZoomToObjectButton from "../ui/zoom-to-object-button.vue";
import { injectContextRequired, requireClientContext, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
import vTooltip from "../../utils/tooltip";
import { isLine, isMarker, normalizeLineName, normalizeMarkerName } from "facilmap-utils";
import { formatTypeName, isLine, isMarker, normalizeLineName, normalizeMarkerName } from "facilmap-utils";
import { useI18n } from "../../utils/i18n";
const context = injectContextRequired();
const client = requireClientContext(context);
const mapContext = requireMapContext(context);
const toasts = useToasts();
const i18n = useI18n();
const props = defineProps<{
objects: Array<Marker | Line>;
@ -66,10 +68,10 @@
toasts.hideToast(`fm${context.id}-multiple-info-delete`);
if (!props.objects || !await showConfirm({
title: "Delete objects",
message: `Do you really want to remove ${props.objects.length} objects?`,
title: i18n.t("multiple-info.delete-objects-title", { count: props.objects.length }),
message: i18n.t("multiple-info.delete-objects-message", { count: props.objects.length }),
variant: "danger",
okLabel: "Delete"
okLabel: i18n.t("multiple-info.delete-objects-ok")
}))
return;
@ -83,7 +85,7 @@
await client.value.deleteLine({ id: object.id });
}
} catch (err) {
toasts.showErrorToast(`fm${context.id}-multiple-info-delete`, "Error deleting objects", err);
toasts.showErrorToast(`fm${context.id}-multiple-info-delete`, i18n.t("multiple-info.delete-objects-error"), err);
} finally {
isDeleting.value = false;
}
@ -110,10 +112,10 @@
<span class="text-break">
<a href="javascript:" @click="emit('click-object', object, $event)">{{isMarker(object) ? normalizeMarkerName(object.name) : normalizeLineName(object.name)}}</a>
{{" "}}
<span class="result-type" v-if="client.types[object.typeId]">({{client.types[object.typeId].name}})</span>
<span class="result-type" v-if="client.types[object.typeId]">({{formatTypeName(client.types[object.typeId].name)}})</span>
</span>
<a href="javascript:" @click="zoomToObject(object)" v-tooltip.left="'Zoom to object'"><Icon icon="zoom-in" alt="Zoom"></Icon></a>
<a href="javascript:" @click="openObject(object)" v-tooltip.right="'Show details'"><Icon icon="arrow-right" alt="Details"></Icon></a>
<a href="javascript:" @click="zoomToObject(object)" v-tooltip.left="i18n.t('multiple-info.zoom-to-object')"><Icon icon="zoom-in" :alt="i18n.t('multiple-info.zoom')"></Icon></a>
<a href="javascript:" @click="openObject(object)" v-tooltip.right="i18n.t('multiple-info.show-details')"><Icon icon="arrow-right" :alt="i18n.t('multiple-info.details')"></Icon></a>
</li>
</ul>
@ -133,7 +135,7 @@
:disabled="isDeleting || mapContext.interaction"
>
<div v-if="isDeleting" class="spinner-border spinner-border-sm"></div>
Delete
{{i18n.t("multiple-info.delete")}}
</button>
</div>
</div>

Wyświetl plik

@ -2,13 +2,15 @@
import OverpassForm from "./overpass-form.vue";
import SearchBoxTab from "../search-box/search-box-tab.vue";
import { injectContextRequired } from "../facil-map-context-provider/facil-map-context-provider.vue";
import { useI18n } from "../../utils/i18n";
const context = injectContextRequired();
const i18n = useI18n();
</script>
<template>
<SearchBoxTab
title="POIs"
:title="i18n.t('overpass-form-tab.pois')"
:id="`fm${context.id}-overpass-form-tab`"
class="fm-overpass-form-tab"
>

Wyświetl plik

@ -1,22 +1,25 @@
<script setup lang="ts">
import { getOverpassPreset, overpassPresets, validateOverpassQuery } from "facilmap-leaflet";
import { getAllOverpassPresets, getOverpassPreset, validateOverpassQuery } from "facilmap-leaflet";
import { computed, ref, watch } from "vue";
import { injectContextRequired, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
import ValidatedField from "../ui/validated-form/validated-field.vue";
import { T, useI18n } from "../../utils/i18n";
import { sortBy } from "lodash-es";
const context = injectContextRequired();
const mapContext = requireMapContext(context);
const i18n = useI18n();
const activeTab = ref(0);
const searchTerm = ref("");
const customQuery = ref("");
const categories = computed(() => {
return overpassPresets.map((cat) => {
const presets = cat.presets.map((presets) => presets.map((preset) => ({
return getAllOverpassPresets().map((cat) => {
const presets = cat.presets.map((presets) => sortBy(presets.map((preset) => ({
...preset,
isChecked: mapContext.value.overpassPresets.some((p) => p.key === preset.key)
})));
})), (preset) => preset.label.toLowerCase()));
return {
...cat,
presets,
@ -73,7 +76,7 @@
class="form-control fm-autofocus"
type="search"
v-model="searchTerm"
placeholder="Filter…"
:placeholder="i18n.t('overpass-form.filter')"
/>
<hr />
@ -168,13 +171,26 @@
<hr />
<p>
Enter an <a href="https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#The_Query_Statement" target="_blank">Overpass query statement</a>
here. Settings and an <code>out</code> statement are added automatically in the background. For ways and relations, a marker will be shown at
the geometric centre, no lines or polygons are drawn.
<T k="overpass-form.custom-explanation-1">
<template #statement>
<a :href="i18n.t('overpass-form.custom-explanation-1-interpolation-statement-url')" target="_blank" rel="noopener">
{{i18n.t("overpass-form.custom-explanation-1-interpolation-statement")}}
</a>
</template>
<template #out>
<code>out</code>
</template>
</T>
</p>
<p>
Example queries are <code>nwr[amenity=parking]</code> to get parking places or
<code>(nwr[amenity=atm];nwr[amenity=bank][atm][atm!=no];)</code> for ATMs.
<T k="overpass-form.custom-explanation-2">
<template #parking>
<code>nwr[amenity=parking]</code>
</template>
<template #atm>
<code>(nwr[amenity=atm];nwr[amenity=bank][atm][atm!=no];)</code>
</template>
</T>
</p>
</template>
@ -186,7 +202,7 @@
class="btn btn-secondary"
:class="{ active: mapContext.overpassIsCustom }"
@click="toggleIsCustom()"
>Custom query</button>
>{{i18n.t("overpass-form.custom-query")}}</button>
</div>
</div>
</template>

Wyświetl plik

@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed, markRaw, onBeforeUnmount, onMounted, ref, watch, watchEffect } from "vue";
import Icon from "../ui/icon.vue";
import { formatCoordinates, formatDistance, formatRouteTime, isSearchId, normalizeMarkerName, splitRouteQuery } from "facilmap-utils";
import { formatCoordinates, formatDistance, formatRouteTime, formatTypeName, isSearchId, normalizeMarkerName, splitRouteQuery } from "facilmap-utils";
import { useToasts } from "../ui/toasts/toasts.vue";
import type { ExportFormat, FindOnMapResult, SearchResult } from "facilmap-types";
import { getMarkerIcon, type HashQuery, MarkerLayer, RouteLayer } from "facilmap-leaflet";
@ -582,7 +582,7 @@
class="dropdown-item"
:class="{ active: suggestion === getSelectedSuggestion(destination) }"
@click="destination.selectedSuggestion = suggestion; reroute(true)"
>{{suggestion.name}} ({{client.types[suggestion.typeId].name}})</a>
>{{suggestion.name}} ({{formatTypeName(client.types[suggestion.typeId].name)}})</a>
</li>
</template>

Wyświetl plik

@ -14,7 +14,7 @@
import { useCarousel } from "../../utils/carousel";
import { injectContextRequired, requireClientContext, requireMapContext } from "../facil-map-context-provider/facil-map-context-provider.vue";
import AddToMapDropdown from "../ui/add-to-map-dropdown.vue";
import { normalizeLineName, normalizeMarkerName } from "facilmap-utils";
import { formatTypeName, normalizeLineName, normalizeMarkerName } from "facilmap-utils";
const context = injectContextRequired();
const client = requireClientContext(context);
@ -182,7 +182,7 @@
<span class="text-break">
<a href="javascript:" @click="handleClick(result, $event)">{{isMarkerResult(result) ? normalizeMarkerName(result.name) : normalizeLineName(result.name)}}</a>
{{" "}}
<span class="result-type">({{client.types[result.typeId].name}})</span>
<span class="result-type">({{formatTypeName(client.types[result.typeId].name)}})</span>
</span>
<a v-if="showZoom" href="javascript:" @click="zoomToResult(result)" v-tooltip.hover.left="'Zoom to result'"><Icon icon="zoom-in" alt="Zoom"></Icon></a>
<a href="javascript:" @click="handleOpen(result, $event)" v-tooltip.left="'Show details'"><Icon icon="arrow-right" alt="Details"></Icon></a>

Wyświetl plik

@ -4,7 +4,7 @@ import { defineComponent, ref } from "vue";
import messagesEn from "../../i18n/en.json";
import messagesDe from "../../i18n/de.json";
import messagesNbNo from "../../i18n/nb-NO.json";
import { decodeQueryString, getRawI18n, onI18nReady, setCurrentUnitsGetter } from "facilmap-utils";
import { decodeQueryString, getAcceptHotI18n, getRawI18n, onI18nReady, setCurrentUnitsGetter } from "facilmap-utils";
import { cookies } from "./cookies";
import { unitsValidator } from "facilmap-types";
@ -17,16 +17,9 @@ onI18nReady((i18n) => {
});
if (import.meta.hot) {
const acceptHot = (lang: string) => (mod: any) => {
if (mod) {
onI18nReady((i18n) => {
i18n.addResourceBundle(lang, namespace, mod!.default);
});
}
};
import.meta.hot!.accept(`../../i18n/en.json`, acceptHot("en"));
import.meta.hot!.accept(`../../i18n/de.json`, acceptHot("de"));
import.meta.hot!.accept(`../../i18n/nb-NO.json`, acceptHot("nb-NO"));
import.meta.hot!.accept(`../../i18n/en.json`, getAcceptHotI18n("en", namespace));
import.meta.hot!.accept(`../../i18n/de.json`, getAcceptHotI18n("de", namespace));
import.meta.hot!.accept(`../../i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
}
const i18nResourceChangeCounter = ref(0);

Wyświetl plik

@ -0,0 +1,163 @@
{
"overpass-presets": {
"category-amenities": "Infrastruktur",
"atm": "Geldautomat",
"bank": "Bank (Kreditinstitut)",
"bench": "Sitzbank",
"bicycleparking": "Fahrradparkplatz",
"bicyclerental": "Fahrradverleih",
"cinema": "Kino",
"clinic": "Klinik",
"drinkingwater": "Trinkwasser",
"embassy": "Botschaft",
"firestation": "Feuerwehr",
"fuel": "Tankstelle",
"hospital": "Krankenhaus",
"library": "Bibliothek",
"musicschool": "Musikschule",
"parking": "Kfz-Parkplatz",
"pharmacy": "Apotheke",
"police": "Polizei",
"postbox": "Briefkasten",
"postoffice": "Post",
"school": "Schule",
"shower": "Dusche",
"taxi": "Taxi",
"theatre": "Theater",
"toilets": "Toilette",
"university": "Universität",
"worship": "Gotteshaus",
"church": "Kirche",
"mosque": "Moschee",
"buddhist": "Buddhistischer Tempel",
"hindu": "Hinduistischer Tempel",
"synagogue": "Synagoge",
"cemetery": "Friedhof",
"category-tourism": "Tourismus",
"abandoned": "Verlassen",
"artscentre": "Kunstzentrum",
"artwork": "Kunstwerk",
"attraction": "Attraktion",
"casino": "Kasino",
"castle": "Burg",
"gallery": "Gallerie",
"heritage": "Kulturerbe",
"historic": "Historisch",
"touristinformation": "Information",
"monument": "Monument/Gedenkstätte",
"monumentaltree": "Monumentaler Baum",
"museum": "Museum",
"nudism": "FKK",
"picnic": "Picknick",
"statue": "Statue",
"themepark": "Freizeitpark",
"viewpoint": "Aussichtspunkt",
"vineyard": "Weinberg",
"windmill": "Windmühle",
"watermill": "Wassermühle",
"zoo": "Zoo",
"tourism": "Tourism=yes",
"category-hotels": "Hotels",
"alpinehut": "Alpenhütte",
"apartment": "Ferienwohnung",
"campsite": "Campingplatz",
"chalet": "Chalet",
"guesthouse": "Gästehaus",
"hostel": "Hostel",
"hotel": "Hotel",
"motel": "Motel",
"spa": "Wellness",
"sauna": "Sauna",
"category-sports": "Sport",
"americanfootball": "American Football",
"baseball": "Baseball",
"basketball": "Basketball",
"cycling": "Radsport",
"gymnastics": "Gymnastik",
"golfcourse": "Golf",
"hockey": "Hockey",
"horseracing": "Pferderennen",
"icehockey": "Eishockey",
"soccer": "Fußball",
"sportscentre": "Sportzentrum",
"surfing": "Surfen",
"swimming": "Schwimmen",
"tabletennis": "Tischtennis",
"tennis": "Tennis",
"volleyball": "Volleyball",
"category-shops": "Geschäfte",
"beautyshop": "Kosmetiksalon",
"bicycleshop": "Fahrrad",
"bookshop": "Bücher",
"carshop": "Auto",
"chemist": "Drogerie",
"clothesshop": "Kleidung",
"copyshop": "Copyshop",
"cosmeticsshop": "Kosmetik",
"departmentstore": "Warenhaus",
"diyshop": "Baumarkt",
"florist": "Blumen",
"gardencentre": "Gartencenter",
"generalshop": "Allgemein",
"giftshop": "Geschenke",
"hairdresser": "Friseur",
"jewelleryshop": "Juwellier",
"kiosk": "Kiosk",
"leathershop": "Leder",
"marketplace": "Marktplatz",
"musicshop": "Musikinstrumente",
"optician": "Optiker",
"petshop": "Haustiere",
"phoneshop": "Handys",
"photoshop": "Fotozubehör",
"shoeshop": "Schuhe",
"mall": "Einkaufszentrum",
"textileshop": "Textilien",
"toyshop": "Spielzeug",
"category-food-shops": "Lebensmittel",
"alcoholshop": "Alkohol",
"bakery": "Bäckerei",
"beverageshop": "Getränke",
"butcher": "Metzgerei",
"cheeseshop": "Käse",
"confectionery": "Konditorei",
"coffeeshop": "Kaffee",
"dairyshop": "Milchprodukte",
"delishop": "Delikatessen",
"groceryshop": "Lebensmittel",
"organicshop": "Bioladen",
"seafoodshop": "Meeresfrüchte",
"supermarket": "Supermarkt",
"wineshop": "Wein",
"category-restaurants": "Restaurants",
"bar": "Bar",
"bbq": "Barbecue",
"biergarten": "Biergarten",
"cafe": "Café",
"fastfood": "Fast Food",
"foodcourt": "Food-Court",
"icecream": "Eis",
"pub": "Pub",
"restaurant": "Restaurant",
"category-various": "Sonstige",
"busstop": "Bushaltestelle",
"bicyclecharging": "E-Bike-Ladepunkt",
"kindergarten": "Kindergarten",
"office": "Büro",
"recycling": "Recycling",
"travelagency": "Reisebüro",
"defibrillator": "Defibrillator",
"fireextinguisher": "Feuerlöscher",
"fixme": "fixme",
"notenode": "Note-Node",
"noteway": "Note-Way",
"construction": "Baustelle",
"image": "Bild",
"camera": "Kamera",
"city": "Großstadt",
"town": "Stadt",
"village": "Dorf",
"hamlet": "Weiler",
"suburb": "Stadtteil"
}
}

Wyświetl plik

@ -0,0 +1,163 @@
{
"overpass-presets": {
"category-amenities": "Amenities",
"atm": "ATM",
"bank": "Bank",
"bench": "Bench",
"bicycleparking": "Bicycle parking",
"bicyclerental": "Bicycle rental",
"cinema": "Cinema",
"clinic": "Clinic",
"drinkingwater": "Drinking water",
"embassy": "Embassy",
"firestation": "Firestation",
"fuel": "Fuel",
"hospital": "Hospital",
"library": "Library",
"musicschool": "Music school",
"parking": "Car parking",
"pharmacy": "Pharmacy",
"police": "Police",
"postbox": "Letter box",
"postoffice": "Post office",
"school": "School/college",
"shower": "Shower",
"taxi": "Taxi",
"theatre": "Theatre",
"toilets": "Toilets",
"university": "University",
"worship": "Place of worship",
"church": "Church",
"mosque": "Mosque",
"buddhist": "Buddhist Temple",
"hindu": "Hindu Temple",
"synagogue": "Synagogue",
"cemetery": "Cemetery",
"category-tourism": "Tourism",
"abandoned": "Abandoned",
"artscentre": "Arts centre",
"artwork": "Artwork",
"attraction": "Attraction",
"casino": "Casino",
"castle": "Castle",
"gallery": "Gallery",
"heritage": "Heritage",
"historic": "Historic",
"touristinformation": "Information",
"monument": "Monument/memorial",
"monumentaltree": "Monumental Tree",
"museum": "Museum",
"nudism": "Nudism",
"picnic": "Picnic",
"statue": "Statue",
"themepark": "Theme park",
"viewpoint": "Viewpoint",
"vineyard": "Vineyard",
"windmill": "Windmill",
"watermill": "Watermill",
"zoo": "Zoo",
"tourism": "Tourism=yes",
"category-hotels": "Hotels",
"alpinehut": "Alpine hut",
"apartment": "Apartment",
"campsite": "Camp site",
"chalet": "Chalet",
"guesthouse": "Guest house",
"hostel": "Hostel",
"hotel": "Hotel",
"motel": "Motel",
"spa": "Spa",
"sauna": "Sauna",
"category-sports": "Sports",
"americanfootball": "American football",
"baseball": "Baseball",
"basketball": "Basketball",
"cycling": "Cycling",
"gymnastics": "Gymnastics",
"golfcourse": "Golf",
"hockey": "Hockey",
"horseracing": "Horse racing",
"icehockey": "Ice hockey",
"soccer": "Soccer",
"sportscentre": "Sports centre",
"surfing": "Surfing",
"swimming": "Swimming",
"tabletennis": "Table tennis",
"tennis": "Tennis",
"volleyball": "Volleyball",
"category-shops": "Shops",
"beautyshop": "Beauty",
"bicycleshop": "Bicycle",
"bookshop": "Books/Stationary",
"carshop": "Car",
"chemist": "Chemist",
"clothesshop": "Clothes",
"copyshop": "Copyshop",
"cosmeticsshop": "Cosmetics",
"departmentstore": "Department store",
"diyshop": "DIY/hardware",
"florist": "Florist",
"gardencentre": "Garden centre",
"generalshop": "General",
"giftshop": "Gift",
"hairdresser": "Hairdresser",
"jewelleryshop": "Jewelry",
"kiosk": "Kiosk",
"leathershop": "Leather",
"marketplace": "Marketplace",
"musicshop": "Musical instrument",
"optician": "Optician",
"petshop": "Pets",
"phoneshop": "Phone",
"photoshop": "Photo",
"shoeshop": "Shoes",
"mall": "Shopping centre",
"textileshop": "Textiles",
"toyshop": "Toys",
"category-food-shops": "Food shops",
"alcoholshop": "Alcohol",
"bakery": "Bakery",
"beverageshop": "Beverages",
"butcher": "Butcher",
"cheeseshop": "Cheese",
"confectionery": "Chocolate/Confectionery",
"coffeeshop": "Coffee",
"dairyshop": "Dairy",
"delishop": "Deli",
"groceryshop": "Grocery",
"organicshop": "Organic",
"seafoodshop": "Seafood",
"supermarket": "Supermarket",
"wineshop": "Wine",
"category-restaurants": "Restaurants",
"bar": "Bar",
"bbq": "BBQ",
"biergarten": "Biergarten",
"cafe": "Cafe",
"fastfood": "Fast food",
"foodcourt": "Food court",
"icecream": "Ice cream",
"pub": "Pub",
"restaurant": "Restaurant",
"category-various": "Various",
"busstop": "Busstop",
"bicyclecharging": "E-bike charging",
"kindergarten": "Kindergarten",
"office": "Office",
"recycling": "Recycling",
"travelagency": "Travel agency",
"defibrillator": "Defibrillator - AED",
"fireextinguisher": "Fire hose/extinguisher",
"fixme": "fixme",
"notenode": "Note-Node",
"noteway": "Note-Way",
"construction": "Construction",
"image": "Image",
"camera": "Public camera",
"city": "City",
"town": "Town",
"village": "Village",
"hamlet": "Hamlet",
"suburb": "Suburb"
}
}

Wyświetl plik

@ -0,0 +1 @@
{}

Wyświetl plik

@ -1,3 +1,5 @@
import { getI18n } from "../utils/i18n";
export interface OverpassPresetCategory {
label: string;
presets: OverpassPreset[][];
@ -10,246 +12,251 @@ export interface OverpassPreset {
}
// These are mostly copied from OpenPoiMap. See https://github.com/marczoutendijk/openpoimap/blob/master/js_source/opm.js.
export const overpassPresets: OverpassPresetCategory[] = [
{
label: "Amenities",
presets: [
[
{ key: "atm", query: "(node[amenity=atm];way[amenity=atm];node[amenity=bank][atm][atm!=no];way[amenity=bank][atm][atm!=no];rel[amenity=bank][atm][atm!=no];)", label: "ATM" },
{ key: "bank", query: "(node[amenity=bank];way[amenity=bank];rel[amenity=bank];)", label: "Bank" },
{ key: "bench", query: "(node[amenity=bench];node(w);)", label: "Bench" },
{ key: "bicycleparking", query: "(node[amenity=bicycle_parking];way[amenity=bicycle_parking];rel[amenity=bicycle_parking];)", label: "Bicycle parking" },
{ key: "bicyclerental", query: "(node[amenity=bicycle_rental];way[amenity=bicycle_rental];rel[amenity=bicycle_rental];)", label: "Bicycle rental" },
{ key: "cinema", query: "(node[amenity=cinema];way[amenity=cinema];rel[amenity=cinema];)", label: "Cinema" },
{ key: "clinic", query: "(node[amenity=clinic];way[amenity=clinic];rel[amenity=clinic];)", label: "Clinic" },
{ key: "drinkingwater", query: "(node[amenity=drinking_water];way[amenity=drinking_water];rel[amenity=drinking_water];)", label: "Drinking water" },
{ key: "embassy", query: "(node[amenity=embassy];way[amenity=embassy];rel[amenity=embassy];)", label: "Embassy" },
{ key: "firestation", query: "(node[amenity=fire_station];way[amenity=fire_station];rel[amenity=fire_station];)", label: "Firestation" },
{ key: "fuel", query: "(node[amenity=fuel];way[amenity=fuel];rel[amenity=fuel];)", label: "Fuel" },
{ key: "hospital", query: "(node[amenity=hospital];way[amenity=hospital];rel[amenity=hospital];)", label: "Hospital" },
{ key: "library", query: "(node[amenity=library];way[amenity=library];rel[amenity=library];)", label: "Library" },
{ key: "musicschool", query: "(node[amenity=music_school];way[amenity=music_school];rel[amenity=music_school];)", label: "Music school" },
{ key: "parking", query: "(node[amenity=parking];way[amenity=parking];rel[amenity=parking];)", label: "Parking" },
{ key: "pharmacy", query: "(node[amenity=pharmacy];way[amenity=pharmacy];rel[amenity=pharmacy];)", label: "Pharmacy" },
{ key: "police", query: "(node[amenity=police];way[amenity=police];rel[amenity=police];)", label: "Police" },
{ key: "postbox", query: "(node[amenity=post_box];node(w);)", label: "Letter box" },
{ key: "postoffice", query: "(node[amenity=post_office];way[amenity=post_office];rel[amenity=post_office];)", label: "Post office" },
{ key: "school", query: "(node[amenity~'^school$|^college$'];way[amenity~'^school$|^college$'];rel[amenity~'^school$|^college$'];)", label: "School/college" },
{ key: "shower", query: "(nwr[amenity=shower];nwr[shower=yes];)", label: "Shower" },
{ key: "taxi", query: "(node[amenity=taxi];way[amenity=taxi];rel[amenity=taxi];)", label: "Taxi" },
{ key: "theatre", query: "(node[amenity=theatre];way[amenity=theatre];rel[amenity=theatre];)", label: "Theatre" },
{ key: "toilets", query: "(node[amenity=toilets];way[amenity=toilets];rel[amenity=toilets];)", label: "Toilets" },
{ key: "university", query: "(node[amenity=university];way[amenity=university];rel[amenity=university];)", label: "University" }
], [
// Check for various religions. We check on 5 religions AND also on a general place_of_worship but excluding the others.
// zaterdag 9 januari 2016 Included rel for the stand-alone religions
{ key: "worship", query: "(node[amenity=place_of_worship][religion!~'christian|muslim|buddhist|hindu|jewish'];way[amenity=place_of_worship][religion!~'christian|muslim|buddhist|hindu|jewish'];rel[amenity=place_of_worship][religion!~'christian|muslim|buddhist|hindu|jewish'];)", label: "Place of worship" },
{ key: "church", query: "(node[amenity=place_of_worship][religion=christian];way[amenity=place_of_worship][religion=christian];rel[amenity=place_of_worship][religion=christian];)", label: "Church" },
{ key: "mosque", query: "(node[amenity=place_of_worship][religion=muslim];way[amenity=place_of_worship][religion=muslim];rel[amenity=place_of_worship][religion=muslim];)", label: "Mosque" },
{ key: "buddhist", query: "(node[amenity=place_of_worship][religion=buddhist];way[amenity=place_of_worship][religion=buddhist];rel[amenity=place_of_worship][religion=buddhist];)", label: "Buddhist Temple" },
{ key: "hindu", query: "(node[amenity=place_of_worship][religion=hindu];way[amenity=place_of_worship][religion=hindu];rel[amenity=place_of_worship][religion=hindu];)", label: "Hindu Temple" },
{ key: "synagogue", query: "(node[amenity=place_of_worship][religion=jewish];way[amenity=place_of_worship][religion=jewish];rel[amenity=place_of_worship][religion=jewish];)", label: "Synagogue" },
// Check only for cemetery for human beings
{ key: "cemetery", query: "(node[landuse=cemetery][animal!~'.'];way[landuse=cemetery][animal!~'.'];rel[landuse=cemetery][animal!~'.'];)", label: "Cemetery" }
export function getAllOverpassPresets(): OverpassPresetCategory[] {
const i18n = getI18n();
return [
{
label: i18n.t("overpass-presets.category-amenities"),
presets: [
[
{ key: "atm", query: "(nwr[amenity=atm];nwr[amenity=bank][atm][atm!=no];)", label: i18n.t("overpass-presets.atm") },
{ key: "bank", query: "nwr[amenity=bank]", label: i18n.t("overpass-presets.bank") },
{ key: "bench", query: "(node[amenity=bench];node(w);)", label: i18n.t("overpass-presets.bench") },
{ key: "bicycleparking", query: "nwr[amenity=bicycle_parking]", label: i18n.t("overpass-presets.bicycleparking") },
{ key: "bicyclerental", query: "nwr[amenity=bicycle_rental]", label: i18n.t("overpass-presets.bicyclerental") },
{ key: "cinema", query: "nwr[amenity=cinema]", label: i18n.t("overpass-presets.cinema") },
{ key: "clinic", query: "nwr[amenity=clinic]", label: i18n.t("overpass-presets.clinic") },
{ key: "drinkingwater", query: "nwr[amenity=drinking_water]", label: i18n.t("overpass-presets.drinkingwater") },
{ key: "embassy", query: "nwr[amenity=embassy]", label: i18n.t("overpass-presets.embassy") },
{ key: "firestation", query: "nwr[amenity=fire_station]", label: i18n.t("overpass-presets.firestation") },
{ key: "fuel", query: "nwr[amenity=fuel]", label: i18n.t("overpass-presets.fuel") },
{ key: "hospital", query: "nwr[amenity=hospital]", label: i18n.t("overpass-presets.hospital") },
{ key: "library", query: "nwr[amenity=library]", label: i18n.t("overpass-presets.library") },
{ key: "musicschool", query: "nwr[amenity=music_school]", label: i18n.t("overpass-presets.musicschool") },
{ key: "parking", query: "nwr[amenity=parking]", label: i18n.t("overpass-presets.parking") },
{ key: "pharmacy", query: "nwr[amenity=pharmacy]", label: i18n.t("overpass-presets.pharmacy") },
{ key: "police", query: "nwr[amenity=police]", label: i18n.t("overpass-presets.police") },
{ key: "postbox", query: "(node[amenity=post_box];node(w);)", label: i18n.t("overpass-presets.postbox") },
{ key: "postoffice", query: "nwr[amenity=post_office]", label: i18n.t("overpass-presets.postoffice") },
{ key: "school", query: "nwr[amenity~'^school$|^college$']", label: i18n.t("overpass-presets.school") },
{ key: "shower", query: "(nwr[amenity=shower];nwr[shower=yes];)", label: i18n.t("overpass-presets.shower") },
{ key: "taxi", query: "nwr[amenity=taxi]", label: i18n.t("overpass-presets.taxi") },
{ key: "theatre", query: "nwr[amenity=theatre]", label: i18n.t("overpass-presets.theatre") },
{ key: "toilets", query: "nwr[amenity=toilets]", label: i18n.t("overpass-presets.toilets") },
{ key: "university", query: "nwr[amenity=university]", label: i18n.t("overpass-presets.university") }
], [
// Check for various religions. We check on 5 religions AND also on a general place_of_worship but excluding the others.
// zaterdag 9 januari 2016 Included rel for the stand-alone religions
{ key: "worship", query: "nwr[amenity=place_of_worship][religion!~'christian|muslim|buddhist|hindu|jewish']", label: i18n.t("overpass-presets.worship") },
{ key: "church", query: "nwr[amenity=place_of_worship][religion=christian]", label: i18n.t("overpass-presets.church") },
{ key: "mosque", query: "nwr[amenity=place_of_worship][religion=muslim]", label: i18n.t("overpass-presets.mosque") },
{ key: "buddhist", query: "nwr[amenity=place_of_worship][religion=buddhist]", label: i18n.t("overpass-presets.buddhist") },
{ key: "hindu", query: "nwr[amenity=place_of_worship][religion=hindu]", label: i18n.t("overpass-presets.hindu") },
{ key: "synagogue", query: "nwr[amenity=place_of_worship][religion=jewish]", label: i18n.t("overpass-presets.synagogue") },
// Check only for cemetery for human beings
{ key: "cemetery", query: "nwr[landuse=cemetery][animal!~'.']", label: i18n.t("overpass-presets.cemetery") }
]
]
]
},
{
label: "Tourism",
presets: [
[
// places to see
{ key: "abandoned", query: `(nwr[~"^abandoned(:|$)"~"."][!"abandoned:highway"];nwr[~"^ruins(:|$)"~"."];)`, label: "Abandoned" },
{ key: "artscentre", query: "(node[amenity=arts_centre];way[amenity=arts_centre];rel[amenity=arts_centre];)", label: "Arts centre" },
{ key: "artwork", query: "(node[tourism=artwork][artwork_type!~'statue'];way[tourism=artwork];rel[tourism=artwork];)", label: "Artwork" },
{ key: "attraction", query: "(node[tourism=attraction];way[tourism=attraction];rel[tourism=attraction];)", label: "Attraction" },
{ key: "casino", query: "(node[leisure=casino];way[leisure=casino];rel[leisure=casino];)", label: "Casino" },
{ key: "castle", query: "(node[historic=castle];way[historic=castle];rel[historic=castle];)", label: "Castle" },
{ key: "gallery", query: "(node[tourism=gallery];way[tourism=gallery];rel[tourism=gallery];)", label: "Gallery" },
{ key: "heritage", query: "(node[heritage];way[heritage];rel[heritage];)", label: "Heritage" },
// Check for all historic tags but exclude those that already have their own
{ key: "historic", query: "(node[historic][historic!~'memorial|monument|statue|castle'];way[historic][historic!~'memorial|monument|statue|castle'];rel[historic][historic!~'memorial|monument|statue|castle'];)", label: "Historic" },
{ key: "touristinformation", query: "(node[tourism=information];way[tourism=information];)", label: "Information" },
{ key: "monument", query: "(node[historic~'^monument$|^memorial$'];way[historic~'^monument$|^memorial$'];rel[historic~'^monument$|^memorial$'];)", label: "Monument/memorial" },
{ key: "monumentaltree", query: "(node[natural=tree][monument=yes];)", label: "Monumental Tree" },
{ key: "museum", query: "(node[tourism=museum];way[tourism=museum];rel[tourism=museum];)", label: "Museum" },
{ key: "nudism", query: "nwr[nudism][nudism!=no]", label: "Nudism" },
{ key: "picnic", query: "(node[tourism=picnic_site];way[tourism=picnic_site];rel[tourism=picnic_site];node[leisure=picnic_table];)", label: "Picnic" },
{ key: "statue", query: "(node[historic=statue];node[landmark=statue];node[tourism=artwork][artwork_type=statue];)", label: "Statue" },
{ key: "themepark", query: "(node[tourism=theme_park];way[tourism=theme_park];rel[tourism=theme_park];)", label: "Theme park" },
{ key: "viewpoint", query: "(node[tourism=viewpoint];way[tourism=viewpoint];rel[tourism=viewpoint];)", label: "Viewpoint" },
{ key: "vineyard", query: "(node[landuse=vineyard];way[landuse=vineyard];rel[landuse=vineyard];)", label: "Vineyard" },
{ key: "windmill", query: "(node[man_made=windmill];way[man_made=windmill];rel[man_made=windmill];)", label: "Windmill" },
{ key: "watermill", query: "(node[man_made=watermill];way[man_made=watermill];rel[man_made=watermill];)", label: "Watermill" },
{ key: "zoo", query: "(node[tourism=zoo];way[tourism=zoo];rel[tourism=zoo];)", label: "ZOO" }
], [
{ key: "tourism", query: "(node[tourism=yes];way[tourism=yes];rel[tourism=yes];)", label: "Tourism=yes" }
},
{
label: i18n.t("overpass-presets.category-tourism"),
presets: [
[
// places to see
{ key: "abandoned", query: `(nwr[~"^abandoned(:|$)"~"."][!"abandoned:highway"];nwr[~"^ruins(:|$)"~"."];)`, label: i18n.t("overpass-presets.abandoned") },
{ key: "artscentre", query: "(node[amenity=arts_centre];way[amenity=arts_centre];rel[amenity=arts_centre];)", label: i18n.t("overpass-presets.artscentre") },
{ key: "artwork", query: "(node[tourism=artwork][artwork_type!~'statue'];way[tourism=artwork];rel[tourism=artwork];)", label: i18n.t("overpass-presets.artwork") },
{ key: "attraction", query: "(node[tourism=attraction];way[tourism=attraction];rel[tourism=attraction];)", label: i18n.t("overpass-presets.attraction") },
{ key: "casino", query: "(node[leisure=casino];way[leisure=casino];rel[leisure=casino];)", label: i18n.t("overpass-presets.casino") },
{ key: "castle", query: "(node[historic=castle];way[historic=castle];rel[historic=castle];)", label: i18n.t("overpass-presets.castle") },
{ key: "gallery", query: "(node[tourism=gallery];way[tourism=gallery];rel[tourism=gallery];)", label: i18n.t("overpass-presets.gallery") },
{ key: "heritage", query: "(node[heritage];way[heritage];rel[heritage];)", label: i18n.t("overpass-presets.heritage") },
// Check for all historic tags but exclude those that already have their own
{ key: "historic", query: "(node[historic][historic!~'memorial|monument|statue|castle'];way[historic][historic!~'memorial|monument|statue|castle'];rel[historic][historic!~'memorial|monument|statue|castle'];)", label: i18n.t("overpass-presets.historic") },
{ key: "touristinformation", query: "(node[tourism=information];way[tourism=information];)", label: i18n.t("overpass-presets.touristinformation") },
{ key: "monument", query: "(node[historic~'^monument$|^memorial$'];way[historic~'^monument$|^memorial$'];rel[historic~'^monument$|^memorial$'];)", label: i18n.t("overpass-presets.monument") },
{ key: "monumentaltree", query: "(node[natural=tree][monument=yes];)", label: i18n.t("overpass-presets.monumentaltree") },
{ key: "museum", query: "(node[tourism=museum];way[tourism=museum];rel[tourism=museum];)", label: i18n.t("overpass-presets.museum") },
{ key: "nudism", query: "nwr[nudism][nudism!=no]", label: i18n.t("overpass-presets.nudism") },
{ key: "picnic", query: "(node[tourism=picnic_site];way[tourism=picnic_site];rel[tourism=picnic_site];node[leisure=picnic_table];)", label: i18n.t("overpass-presets.picnic") },
{ key: "statue", query: "(node[historic=statue];node[landmark=statue];node[tourism=artwork][artwork_type=statue];)", label: i18n.t("overpass-presets.statue") },
{ key: "themepark", query: "(node[tourism=theme_park];way[tourism=theme_park];rel[tourism=theme_park];)", label: i18n.t("overpass-presets.themepark") },
{ key: "viewpoint", query: "(node[tourism=viewpoint];way[tourism=viewpoint];rel[tourism=viewpoint];)", label: i18n.t("overpass-presets.viewpoint") },
{ key: "vineyard", query: "(node[landuse=vineyard];way[landuse=vineyard];rel[landuse=vineyard];)", label: i18n.t("overpass-presets.vineyard") },
{ key: "windmill", query: "(node[man_made=windmill];way[man_made=windmill];rel[man_made=windmill];)", label: i18n.t("overpass-presets.windmill") },
{ key: "watermill", query: "(node[man_made=watermill];way[man_made=watermill];rel[man_made=watermill];)", label: i18n.t("overpass-presets.watermill") },
{ key: "zoo", query: "(node[tourism=zoo];way[tourism=zoo];rel[tourism=zoo];)", label: i18n.t("overpass-presets.zoo") }
], [
{ key: "tourism", query: "(node[tourism=yes];way[tourism=yes];rel[tourism=yes];)", label: i18n.t("overpass-presets.tourism") }
]
]
]
},
{
label: "Hotels",
presets: [
[
// Places to stay
{ key: "alpinehut", query: "(node[tourism=alpine_hut];way[tourism=alpine_hut];rel[tourism=alpine_hut];)", label: "Alpine hut" },
{ key: "apartment", query: "(node[tourism=apartment];way[tourism=apartment];rel[tourism=apartment];)", label: "Apartment" },
{ key: "campsite", query: "(node[tourism=camp_site][backcountry!=yes];way[tourism=camp_site][backcountry!=yes];rel[tourism=camp_site][backcountry!=yes];)", label: "Camp site" },
{ key: "chalet", query: "(node[tourism=chalet];way[tourism=chalet];rel[tourism=chalet];)", label: "Chalet" },
{ key: "guesthouse", query: "(node[tourism~'guest_house|bed_and_breakfast'];way[tourism~'guest_house|bed_and_breakfast'];rel[tourism~'guest_house|bed_and_breakfast'];)", label: "Guest house" },
{ key: "hostel", query: "(node[tourism=hostel];way[tourism=hostel];rel[tourism=hostel];)", label: "Hostel" },
{ key: "hotel", query: "(node[tourism=hotel];way[tourism=hotel];rel[tourism=hotel];)", label: "Hotel" },
{ key: "motel", query: "(node[tourism=motel];way[tourism=motel];rel[tourism=motel];)", label: "Motel" }
], [
{ key: "casino", query: "(node[amenity=casino];way[amenity=casino];rel[amenity=casino];)", label: "Casino" },
{ key: "spa", query: "(node[leisure=spa];way[leisure=spa];rel[leisure=spa];)", label: "Spa" },
{ key: "sauna", query: "(node[leisure=sauna];way[leisure=sauna];rel[leisure=sauna];)", label: "Sauna" }
},
{
label: i18n.t("overpass-presets.category-hotels"),
presets: [
[
// Places to stay
{ key: "alpinehut", query: "(node[tourism=alpine_hut];way[tourism=alpine_hut];rel[tourism=alpine_hut];)", label: i18n.t("overpass-presets.alpinehut") },
{ key: "apartment", query: "(node[tourism=apartment];way[tourism=apartment];rel[tourism=apartment];)", label: i18n.t("overpass-presets.apartment") },
{ key: "campsite", query: "(node[tourism=camp_site][backcountry!=yes];way[tourism=camp_site][backcountry!=yes];rel[tourism=camp_site][backcountry!=yes];)", label: i18n.t("overpass-presets.campsite") },
{ key: "chalet", query: "(node[tourism=chalet];way[tourism=chalet];rel[tourism=chalet];)", label: i18n.t("overpass-presets.chalet") },
{ key: "guesthouse", query: "(node[tourism~'guest_house|bed_and_breakfast'];way[tourism~'guest_house|bed_and_breakfast'];rel[tourism~'guest_house|bed_and_breakfast'];)", label: i18n.t("overpass-presets.guesthouse") },
{ key: "hostel", query: "(node[tourism=hostel];way[tourism=hostel];rel[tourism=hostel];)", label: i18n.t("overpass-presets.hostel") },
{ key: "hotel", query: "(node[tourism=hotel];way[tourism=hotel];rel[tourism=hotel];)", label: i18n.t("overpass-presets.hotel") },
{ key: "motel", query: "(node[tourism=motel];way[tourism=motel];rel[tourism=motel];)", label: i18n.t("overpass-presets.motel") }
], [
{ key: "casino", query: "(node[amenity=casino];way[amenity=casino];rel[amenity=casino];)", label: i18n.t("overpass-presets.casino") },
{ key: "spa", query: "(node[leisure=spa];way[leisure=spa];rel[leisure=spa];)", label: i18n.t("overpass-presets.spa") },
{ key: "sauna", query: "(node[leisure=sauna];way[leisure=sauna];rel[leisure=sauna];)", label: i18n.t("overpass-presets.sauna") }
]
]
]
},
{
label: "Sports",
presets: [
[
{ key: "americanfootball", query: "(way[sport=american_football];way[sport=american_football];)", label: "American football" },
{ key: "baseball", query: "(way[sport=baseball];node[sport=baseball];)", label: "Baseball" },
{ key: "basketball", query: "(way[sport=basketball];node[sport=basketball];)", label: "Basketball" },
{ key: "cycling", query: "(way[sport=cycling];node[sport=cycling];rel[sport=cycling];)", label: "Cycling" },
{ key: "gymnastics", query: "(way[sport=gymnastics];node[sport=gymnastics];rel[sport=gymnastics];)", label: "Gymnastics" },
{ key: "golfcourse", query: "(way[leisure=golf_course];way[sport=golf];node[leisure=golf_course];node[sport=golf];rel[leisure=golf_course];rel[sport=golf];)", label: "Golf" },
{ key: "hockey", query: "(way[sport=hockey];node[sport=hockey];rel[sport=hockey];way[sport=field_hockey];node[sport=field_hockey];rel[sport=field_hockey];)", label: "Hockey" },
{ key: "horseracing", query: "(way[sport=horse_racing];way[sport=equestrian];node[sport=horse_racing];node[sport=equestrian];)", label: "Horse racing" },
{ key: "icehockey", query: "(way[sport=ice_hockey];node[sport=ice_hockey];rel[sport=ice_hockey];way[leisure=ice_rink];node[leisure=ice_rink];)", label: "Ice hockey" },
{ key: "soccer", query: "(way[sport=soccer];node[sport=soccer];rel[sport=soccer];)", label: "Soccer" },
{ key: "sportscentre", query: "(way[leisure=sports_centre];node[leisure=sports_centre];rel[leisure=sports_centre];)", label: "Sports centre" },
{ key: "surfing", query: "(way[sport=surfing];node[sport=surfing];rel[sport=surfing];)", label: "Surfing" },
{ key: "swimming", query: "(way[sport=swimming];node[sport=swimming];rel[sport=swimming];)", label: "Swimming" },
{ key: "tabletennis", query: "(way[sport=table_tennis];node[sport=table_tennis];)", label: "Table tennis" },
{ key: "tennis", query: "(way[sport=tennis];node[sport=tennis];)", label: "Tennis" },
{ key: "volleyball", query: "(way[sport=volleyball];node[sport=volleyball];)", label: "Volleyball" }
},
{
label: i18n.t("overpass-presets.category-sports"),
presets: [
[
{ key: "americanfootball", query: "(way[sport=american_football];way[sport=american_football];)", label: i18n.t("overpass-presets.americanfootball") },
{ key: "baseball", query: "(way[sport=baseball];node[sport=baseball];)", label: i18n.t("overpass-presets.baseball") },
{ key: "basketball", query: "(way[sport=basketball];node[sport=basketball];)", label: i18n.t("overpass-presets.basketball") },
{ key: "cycling", query: "(way[sport=cycling];node[sport=cycling];rel[sport=cycling];)", label: i18n.t("overpass-presets.cycling") },
{ key: "gymnastics", query: "(way[sport=gymnastics];node[sport=gymnastics];rel[sport=gymnastics];)", label: i18n.t("overpass-presets.gymnastics") },
{ key: "golfcourse", query: "(way[leisure=golf_course];way[sport=golf];node[leisure=golf_course];node[sport=golf];rel[leisure=golf_course];rel[sport=golf];)", label: i18n.t("overpass-presets.golfcourse") },
{ key: "hockey", query: "(way[sport=hockey];node[sport=hockey];rel[sport=hockey];way[sport=field_hockey];node[sport=field_hockey];rel[sport=field_hockey];)", label: i18n.t("overpass-presets.hockey") },
{ key: "horseracing", query: "(way[sport=horse_racing];way[sport=equestrian];node[sport=horse_racing];node[sport=equestrian];)", label: i18n.t("overpass-presets.horseracing") },
{ key: "icehockey", query: "(way[sport=ice_hockey];node[sport=ice_hockey];rel[sport=ice_hockey];way[leisure=ice_rink];node[leisure=ice_rink];)", label: i18n.t("overpass-presets.icehockey") },
{ key: "soccer", query: "(way[sport=soccer];node[sport=soccer];rel[sport=soccer];)", label: i18n.t("overpass-presets.soccer") },
{ key: "sportscentre", query: "(way[leisure=sports_centre];node[leisure=sports_centre];rel[leisure=sports_centre];)", label: i18n.t("overpass-presets.sportscentre") },
{ key: "surfing", query: "(way[sport=surfing];node[sport=surfing];rel[sport=surfing];)", label: i18n.t("overpass-presets.surfing") },
{ key: "swimming", query: "(way[sport=swimming];node[sport=swimming];rel[sport=swimming];)", label: i18n.t("overpass-presets.swimming") },
{ key: "tabletennis", query: "(way[sport=table_tennis];node[sport=table_tennis];)", label: i18n.t("overpass-presets.tabletennis") },
{ key: "tennis", query: "(way[sport=tennis];node[sport=tennis];)", label: i18n.t("overpass-presets.tennis") },
{ key: "volleyball", query: "(way[sport=volleyball];node[sport=volleyball];)", label: i18n.t("overpass-presets.volleyball") }
]
]
]
},
{
label: "Shops",
presets: [
[
//Various shops (excluding food)
{ key: "beautyshop", query: "(node[shop=beauty];way[shop=beauty];rel[shop=beauty];)", label: "Beauty" },
{ key: "bicycleshop", query: "(node[shop=bicycle];way[shop=bicycle];rel[shop=bicycle];)", label: "Bicycle" },
{ key: "bookshop", query: "(node[shop~'books|stationary'];way[shop~'books|stationary'];rel[shop~'books|stationary'];)", label: "Books/Stationary" },
{ key: "carshop", query: "(node[shop=car];way[shop=car];rel[shop=car];)", label: "Car" },
{ key: "chemist", query: "(node[shop=chemist];way[shop=chemist];rel[shop=chemist];)", label: "Chemist" },
{ key: "clothesshop", query: "(node[shop=clothes];way[shop=clothes];rel[shop=clothes];)", label: "Clothes" },
{ key: "copyshop", query: "(node[shop=copyshop];way[shop=copyshop];rel[shop=copyshop];)", label: "Copyshop" },
{ key: "cosmeticsshop", query: "(node[shop=cosmetics];way[shop=cosmetics];rel[shop=cosmetics];)", label: "Cosmetics" },
{ key: "departmentstore", query: "(node[shop=department_store];way[shop=department_store];rel[shop=department_store];)", label: "Department store" },
{ key: "diyshop", query: "(node[shop~'doityourself|hardware'];way[shop~'doityourself|hardware'];rel[shop~'doityourself|hardware'];)", label: "DIY/hardware" },
{ key: "florist", query: "(nwr[shop=florist];nwr[shop=garden_centre];)", label: "Florist" },
{ key: "gardencentre", query: "(node[shop=garden_centre];way[shop=garden_centre];rel[shop=garden_centre];)", label: "Garden centre" },
{ key: "generalshop", query: "(node[shop=general];way[shop=general];rel[shop=general];)", label: "General" },
{ key: "giftshop", query: "(node[shop=gift];way[shop=gift];rel[shop=gift];)", label: "Gift" },
{ key: "hairdresser", query: "(node[shop=hairdresser];way[shop=hairdresser];rel[shop=hairdresser];)", label: "Hairdresser" },
// See tagging-list january 2016
{ key: "jewelleryshop", query: "(node[shop~'jewelry|jewellery'];way[shop~'jewelry|jewellery'];rel[shop~'jewelry|jewellery'];)", label: "Jewelry" },
{ key: "kiosk", query: "(node[shop=kiosk];way[shop=kiosk];rel[shop=kiosk];)", label: "Kiosk" },
{ key: "leathershop", query: "(node[shop=leather];way[shop=leather];rel[shop=leather];)", label: "Leather" },
{ key: "marketplace", query: "(node[amenity=marketplace];way[amenity=marketplace];rel[amenity=marketplace];)", label: "Marketplace" },
{ key: "musicshop", query: "(node[shop=musical_instrument];way[shop=musical_instrument];rel[shop=musical_instrument];)", label: "Musical instrument" },
{ key: "optician", query: "(node[shop=optician];way[shop=optician];rel[shop=optician];)", label: "Optician" },
{ key: "petshop", query: "(node[shop=pets];way[shop=pets];rel[shop=pets];)", label: "Pets" },
{ key: "phoneshop", query: "(node[shop=mobile_phone];way[shop=mobile_phone];rel[shop=mobile_phone];)", label: "Phone" },
{ key: "photoshop", query: "(node[shop=photo];way[shop=photo];rel[shop=photo];)", label: "Photo" },
{ key: "shoeshop", query: "(node[shop=shoes];way[shop=shoes];)", label: "Shoes" },
{ key: "mall", query: "(node[shop=mall];way[shop=mall];rel[shop=mall];)", label: "Shopping centre" },
{ key: "textileshop", query: "(node[shop=textiles];way[shop=textiles];rel[shop=textiles];)", label: "Textiles" },
{ key: "toyshop", query: "(node[shop=toys];way[shop=toys];rel[shop=toys];)", label: "Toys" }
},
{
label: i18n.t("overpass-presets.category-shops"),
presets: [
[
//Various shops (excluding food)
{ key: "beautyshop", query: "(node[shop=beauty];way[shop=beauty];rel[shop=beauty];)", label: i18n.t("overpass-presets.beautyshop") },
{ key: "bicycleshop", query: "(node[shop=bicycle];way[shop=bicycle];rel[shop=bicycle];)", label: i18n.t("overpass-presets.bicycleshop") },
{ key: "bookshop", query: "(node[shop~'books|stationary'];way[shop~'books|stationary'];rel[shop~'books|stationary'];)", label: i18n.t("overpass-presets.bookshop") },
{ key: "carshop", query: "(node[shop=car];way[shop=car];rel[shop=car];)", label: i18n.t("overpass-presets.carshop") },
{ key: "chemist", query: "(node[shop=chemist];way[shop=chemist];rel[shop=chemist];)", label: i18n.t("overpass-presets.chemist") },
{ key: "clothesshop", query: "(node[shop=clothes];way[shop=clothes];rel[shop=clothes];)", label: i18n.t("overpass-presets.clothesshop") },
{ key: "copyshop", query: "(node[shop=copyshop];way[shop=copyshop];rel[shop=copyshop];)", label: i18n.t("overpass-presets.copyshop") },
{ key: "cosmeticsshop", query: "(node[shop=cosmetics];way[shop=cosmetics];rel[shop=cosmetics];)", label: i18n.t("overpass-presets.cosmeticsshop") },
{ key: "departmentstore", query: "(node[shop=department_store];way[shop=department_store];rel[shop=department_store];)", label: i18n.t("overpass-presets.departmentstore") },
{ key: "diyshop", query: "(node[shop~'doityourself|hardware'];way[shop~'doityourself|hardware'];rel[shop~'doityourself|hardware'];)", label: i18n.t("overpass-presets.diyshop") },
{ key: "florist", query: "(nwr[shop=florist];nwr[shop=garden_centre];)", label: i18n.t("overpass-presets.florist") },
{ key: "gardencentre", query: "(node[shop=garden_centre];way[shop=garden_centre];rel[shop=garden_centre];)", label: i18n.t("overpass-presets.gardencentre") },
{ key: "generalshop", query: "(node[shop=general];way[shop=general];rel[shop=general];)", label: i18n.t("overpass-presets.generalshop") },
{ key: "giftshop", query: "(node[shop=gift];way[shop=gift];rel[shop=gift];)", label: i18n.t("overpass-presets.giftshop") },
{ key: "hairdresser", query: "(node[shop=hairdresser];way[shop=hairdresser];rel[shop=hairdresser];)", label: i18n.t("overpass-presets.hairdresser") },
// See tagging-list january 2016
{ key: "jewelleryshop", query: "(node[shop~'jewelry|jewellery'];way[shop~'jewelry|jewellery'];rel[shop~'jewelry|jewellery'];)", label: i18n.t("overpass-presets.jewelleryshop") },
{ key: "kiosk", query: "(node[shop=kiosk];way[shop=kiosk];rel[shop=kiosk];)", label: i18n.t("overpass-presets.kiosk") },
{ key: "leathershop", query: "(node[shop=leather];way[shop=leather];rel[shop=leather];)", label: i18n.t("overpass-presets.leathershop") },
{ key: "marketplace", query: "(node[amenity=marketplace];way[amenity=marketplace];rel[amenity=marketplace];)", label: i18n.t("overpass-presets.marketplace") },
{ key: "musicshop", query: "(node[shop=musical_instrument];way[shop=musical_instrument];rel[shop=musical_instrument];)", label: i18n.t("overpass-presets.musicshop") },
{ key: "optician", query: "(node[shop=optician];way[shop=optician];rel[shop=optician];)", label: i18n.t("overpass-presets.optician") },
{ key: "petshop", query: "(node[shop=pets];way[shop=pets];rel[shop=pets];)", label: i18n.t("overpass-presets.petshop") },
{ key: "phoneshop", query: "(node[shop=mobile_phone];way[shop=mobile_phone];rel[shop=mobile_phone];)", label: i18n.t("overpass-presets.phoneshop") },
{ key: "photoshop", query: "(node[shop=photo];way[shop=photo];rel[shop=photo];)", label: i18n.t("overpass-presets.photoshop") },
{ key: "shoeshop", query: "(node[shop=shoes];way[shop=shoes];)", label: i18n.t("overpass-presets.shoeshop") },
{ key: "mall", query: "(node[shop=mall];way[shop=mall];rel[shop=mall];)", label: i18n.t("overpass-presets.mall") },
{ key: "textileshop", query: "(node[shop=textiles];way[shop=textiles];rel[shop=textiles];)", label: i18n.t("overpass-presets.textileshop") },
{ key: "toyshop", query: "(node[shop=toys];way[shop=toys];rel[shop=toys];)", label: i18n.t("overpass-presets.toyshop") }
]
]
]
},
{
label: "Food shops",
presets: [
[
// food shops
{ key: "alcoholshop", query: "(node[shop=alcohol];way[shop=alcohol];rel[shop=alcohol];)", label: "Alcohol" },
{ key: "bakery", query: "(node[shop=bakery];way[shop=bakery];)", label: "Bakery" },
{ key: "beverageshop", query: "(node[shop=beverages];way[shop=beverages];rel[shop=beverages];)", label: "Beverages" },
{ key: "butcher", query: "(node[shop=butcher];way[shop=butcher];rel[shop=butcher];)", label: "Butcher" },
{ key: "cheeseshop", query: "(node[shop=cheese];way[shop=cheese];rel[shop=cheese];)", label: "Cheese" },
{ key: "confectionery", query: "(node[shop~'chocolate|confectionery'];way[shop~'chocolate|confectionery'];rel[shop~'chocolate|confectionery'];)", label: "Chocolate/Confectionery" },
{ key: "coffeeshop", query: "(node[shop=coffee];way[shop=coffee];rel[shop=coffee];)", label: "Coffee" },
{ key: "dairyshop", query: "(node[shop=dairy];way[shop=dairy];)", label: "Dairy" },
{ key: "delishop", query: "(node[shop=deli];way[shop=deli];node[shop=delicatessen];way[shop=delicatessen];)", label: "Deli" },
{ key: "groceryshop", query: "(node[shop=grocery];way[shop=grocery];)", label: "Grocery" },
{ key: "organicshop", query: "(node[shop=organic];way[shop=organic];rel[shop=organic];)", label: "Organic" },
{ key: "seafoodshop", query: "(node[shop=seafood];way[shop=seafood];rel[shop=seafood];)", label: "Seafood" },
{ key: "supermarket", query: "(node[shop=supermarket];way[shop=supermarket];)", label: "Supermarket" },
{ key: "wineshop", query: "(node[shop=wine];way[shop=wine];rel[shop=wine];)", label: "Wine" }
},
{
label: i18n.t("overpass-presets.category-food-shops"),
presets: [
[
// food shops
{ key: "alcoholshop", query: "(node[shop=alcohol];way[shop=alcohol];rel[shop=alcohol];)", label: i18n.t("overpass-presets.alcoholshop") },
{ key: "bakery", query: "(node[shop=bakery];way[shop=bakery];)", label: i18n.t("overpass-presets.bakery") },
{ key: "beverageshop", query: "(node[shop=beverages];way[shop=beverages];rel[shop=beverages];)", label: i18n.t("overpass-presets.beverageshop") },
{ key: "butcher", query: "(node[shop=butcher];way[shop=butcher];rel[shop=butcher];)", label: i18n.t("overpass-presets.butcher") },
{ key: "cheeseshop", query: "(node[shop=cheese];way[shop=cheese];rel[shop=cheese];)", label: i18n.t("overpass-presets.cheeseshop") },
{ key: "confectionery", query: "(node[shop~'chocolate|confectionery'];way[shop~'chocolate|confectionery'];rel[shop~'chocolate|confectionery'];)", label: i18n.t("overpass-presets.confectionery") },
{ key: "coffeeshop", query: "(node[shop=coffee];way[shop=coffee];rel[shop=coffee];)", label: i18n.t("overpass-presets.coffeeshop") },
{ key: "dairyshop", query: "(node[shop=dairy];way[shop=dairy];)", label: i18n.t("overpass-presets.dairyshop") },
{ key: "delishop", query: "(node[shop=deli];way[shop=deli];node[shop=delicatessen];way[shop=delicatessen];)", label: i18n.t("overpass-presets.delishop") },
{ key: "groceryshop", query: "(node[shop=grocery];way[shop=grocery];)", label: i18n.t("overpass-presets.groceryshop") },
{ key: "organicshop", query: "(node[shop=organic];way[shop=organic];rel[shop=organic];)", label: i18n.t("overpass-presets.organicshop") },
{ key: "seafoodshop", query: "(node[shop=seafood];way[shop=seafood];rel[shop=seafood];)", label: i18n.t("overpass-presets.seafoodshop") },
{ key: "supermarket", query: "(node[shop=supermarket];way[shop=supermarket];)", label: i18n.t("overpass-presets.supermarket") },
{ key: "wineshop", query: "(node[shop=wine];way[shop=wine];rel[shop=wine];)", label: i18n.t("overpass-presets.wineshop") }
]
]
]
},
{
label: "Restaurants",
presets: [
[
// places to eat
{ key: "bar", query: "(node[amenity=bar];way[amenity=bar];rel[amenity=bar];)", label: "Bar" },
{ key: "bbq", query: "(node[amenity=bbq];way[amenity=bbq];)", label: "BBQ" },
{ key: "biergarten", query: "(node[amenity=biergarten];way[amenity=biergarten];)", label: "Biergarten" },
{ key: "cafe", query: "(node[amenity=cafe];way[amenity=cafe];rel[amenity=cafe];)", label: "Cafe" },
{ key: "fastfood", query: "(node[amenity=fast_food];way[amenity=fast_food];rel[amenity=fast_food];)", label: "Fast food" },
{ key: "foodcourt", query: "(node[amenity=food_court];way[amenity=food_court];)", label: "Food court" },
{ key: "icecream", query: "(node[amenity=ice_cream];way[amenity=ice_cream];rel[amenity=ice_cream];node[cuisine=ice_cream];way[cuisine=ice_cream];rel[cuisine=ice_cream];)", label: "Ice cream" },
{ key: "pub", query: "(node[amenity=pub];way[amenity=pub];rel[amenity=pub];)", label: "Pub" },
{ key: "restaurant", query: "(node[amenity=restaurant];way[amenity=restaurant];rel[amenity=restaurant];)", label: "Restaurant" }
},
{
label: i18n.t("overpass-presets.category-restaurants"),
presets: [
[
// places to eat
{ key: "bar", query: "(node[amenity=bar];way[amenity=bar];rel[amenity=bar];)", label: i18n.t("overpass-presets.bar") },
{ key: "bbq", query: "(node[amenity=bbq];way[amenity=bbq];)", label: i18n.t("overpass-presets.bbq") },
{ key: "biergarten", query: "(node[amenity=biergarten];way[amenity=biergarten];)", label: i18n.t("overpass-presets.biergarten") },
{ key: "cafe", query: "(node[amenity=cafe];way[amenity=cafe];rel[amenity=cafe];)", label: i18n.t("overpass-presets.cafe") },
{ key: "fastfood", query: "(node[amenity=fast_food];way[amenity=fast_food];rel[amenity=fast_food];)", label: i18n.t("overpass-presets.fastfood") },
{ key: "foodcourt", query: "(node[amenity=food_court];way[amenity=food_court];)", label: i18n.t("overpass-presets.foodcourt") },
{ key: "icecream", query: "(node[amenity=ice_cream];way[amenity=ice_cream];rel[amenity=ice_cream];node[cuisine=ice_cream];way[cuisine=ice_cream];rel[cuisine=ice_cream];)", label: i18n.t("overpass-presets.icecream") },
{ key: "pub", query: "(node[amenity=pub];way[amenity=pub];rel[amenity=pub];)", label: i18n.t("overpass-presets.pub") },
{ key: "restaurant", query: "(node[amenity=restaurant];way[amenity=restaurant];rel[amenity=restaurant];)", label: i18n.t("overpass-presets.restaurant") }
]
]
]
},
{
label: "Various",
presets: [
[
{ key: "busstop", query: "(node[highway=bus_stop];)", label: "Busstop" },
{ key: "bicyclecharging", query: "(node[amenity=charging_station][bicycle=yes];rel[amenity=charging_station][bicycle=yes];)", label: "E-bike charging" },
{ key: "kindergarten", query: "(node[amenity~'childcare|kindergarten'];way[amenity~'childcare|kindergarten'];rel[amenity~'childcare|kindergarten'];)", label: "Kindergarten" },
{ key: "marketplace", query: "(node[amenity=marketplace];way[amenity=marketplace];rel[amenity=marketplace];)", label: "Marketplace" },
{ key: "office", query: "(node[office];way[office];rel[office];)", label: "Office" },
{ key: "recycling", query: "(node[amenity=recycling];way[amenity=recycling];rel[amenity=recycling];)", label: "Recycling" },
{ key: "travelagency", query: "(node[shop=travel_agency];way[shop=travel_agency];rel[shop=travel_agency];)", label: "Travel agency" }
],
[
{ key: "defibrillator", query: "(node[emergency=defibrillator];way[emergency=defibrillator];rel[emergency=defibrillator];)", label: "Defibrillator - AED" },
{ key: "fireextinguisher", query: "(node[emergency=fire_extinguisher];node[emergency=fire_hose];)", label: "Fire hose/extinguisher" },
],
[
// Do not include a relation for the fixme, as it produces a lot of extraneous data
{ key: "fixme", query: "(node[fixme];way[fixme];node[FIXME];way[FIXME];)", label: "fixme" },
// { key: "", query: "(node[~'^fixme$',i];way[~'^fixme$',i];)", label: "fixme" },
{ key: "notenode", query: "(node[note];way[note];)", label: "Note-Node" },
{ key: "noteway", query: "(way[note];)", label: "Note-Way" },
{ key: "construction", query: "(node[highway=construction];way[highway=construction];)", label: "Construction" },
{ key: "image", query: "(node[image];way[image];)", label: "Image" },
{ key: "camera", query: "(node['surveillance:type'~'camera|webcam'];)", label: "Public camera" },
],
[
{ key: "city", query: "(node[place=city];)", label: "City" },
{ key: "town", query: "(node[place=town];)", label: "Town" },
{ key: "village", query: "(node[place=village];)", label: "Village" },
{ key: "hamlet", query: "(node[place=hamlet];)", label: "Hamlet" },
{ key: "suburb", query: "(node[place=suburb];)", label: "Suburb" }
},
{
label: i18n.t("overpass-presets.category-various"),
presets: [
[
{ key: "busstop", query: "(node[highway=bus_stop];)", label: i18n.t("overpass-presets.busstop") },
{ key: "bicyclecharging", query: "(node[amenity=charging_station][bicycle=yes];rel[amenity=charging_station][bicycle=yes];)", label: i18n.t("overpass-presets.bicyclecharging") },
{ key: "kindergarten", query: "(node[amenity~'childcare|kindergarten'];way[amenity~'childcare|kindergarten'];rel[amenity~'childcare|kindergarten'];)", label: i18n.t("overpass-presets.kindergarten") },
{ key: "marketplace", query: "(node[amenity=marketplace];way[amenity=marketplace];rel[amenity=marketplace];)", label: i18n.t("overpass-presets.marketplace") },
{ key: "office", query: "(node[office];way[office];rel[office];)", label: i18n.t("overpass-presets.office") },
{ key: "recycling", query: "(node[amenity=recycling];way[amenity=recycling];rel[amenity=recycling];)", label: i18n.t("overpass-presets.recycling") },
{ key: "travelagency", query: "(node[shop=travel_agency];way[shop=travel_agency];rel[shop=travel_agency];)", label: i18n.t("overpass-presets.travelagency") }
],
[
{ key: "defibrillator", query: "(node[emergency=defibrillator];way[emergency=defibrillator];rel[emergency=defibrillator];)", label: i18n.t("overpass-presets.defibrillator") },
{ key: "fireextinguisher", query: "(node[emergency=fire_extinguisher];node[emergency=fire_hose];)", label: i18n.t("overpass-presets.fireextinguisher") },
],
[
// Do not include a relation for the fixme, as it produces a lot of extraneous data
{ key: "fixme", query: "(node[fixme];way[fixme];node[FIXME];way[FIXME];)", label: i18n.t("overpass-presets.fixme") },
// { key: "", query: "(node[~'^fixme$',i];way[~'^fixme$',i];)", label: i18n.t("overpass-presets.") },
{ key: "notenode", query: "(node[note];way[note];)", label: i18n.t("overpass-presets.notenode") },
{ key: "noteway", query: "(way[note];)", label: i18n.t("overpass-presets.noteway") },
{ key: "construction", query: "(node[highway=construction];way[highway=construction];)", label: i18n.t("overpass-presets.construction") },
{ key: "image", query: "(node[image];way[image];)", label: i18n.t("overpass-presets.image") },
{ key: "camera", query: "(node['surveillance:type'~'camera|webcam'];)", label: i18n.t("overpass-presets.camera") },
],
[
{ key: "city", query: "(node[place=city];)", label: i18n.t("overpass-presets.city") },
{ key: "town", query: "(node[place=town];)", label: i18n.t("overpass-presets.town") },
{ key: "village", query: "(node[place=village];)", label: i18n.t("overpass-presets.village") },
{ key: "hamlet", query: "(node[place=hamlet];)", label: i18n.t("overpass-presets.hamlet") },
{ key: "suburb", query: "(node[place=suburb];)", label: i18n.t("overpass-presets.suburb") }
// { key: "", query: "(way[name~'^[Ff]ietspad'];)->.fietspaden;(way(foreach.fietspaden)[highway=cycleway][name][name~'^[Ff]ietspad$'])", naam:"fietspad" }
// { key: "", query: "(way[name~'^Fietspad|^fietspad|^pad$|^Pad$|cycleway|^path$|^Path$'];node(w);way[highway=cycleway][name!~'.'];node(w);)", naam:"fietspad" }
// { key: "", query: "(way[name~'^[Ff]ietspad'];)->.fietspaden;(way(foreach.fietspaden)[highway=cycleway][name][name~'^[Ff]ietspad$'])", naam:"fietspad" }
// { key: "", query: "(way[name~'^Fietspad|^fietspad|^pad$|^Pad$|cycleway|^path$|^Path$'];node(w);way[highway=cycleway][name!~'.'];node(w);)", naam:"fietspad" }
]
]
]
}
];
}
]
};
// For backwards compatibility. Does not provide i18n reactivity.
export const overpassPresets = getAllOverpassPresets();
export function getOverpassPreset(key: string): OverpassPreset | undefined {
return overpassPresets.map((p) => p.presets).flat().flat().find((p) => p.key == key) as OverpassPreset | undefined;
return getAllOverpassPresets().map((p) => p.presets).flat().flat().find((p) => p.key == key) as OverpassPreset | undefined;
}
export function getOverpassPresets(keys: string[]): OverpassPreset[] {
return overpassPresets.map((p) => p.presets).flat().flat().filter((p) => keys.includes(p.key)) as OverpassPreset[];
return getAllOverpassPresets().map((p) => p.presets).flat().flat().filter((p) => keys.includes(p.key)) as OverpassPreset[];
}

Wyświetl plik

@ -0,0 +1,28 @@
/// <reference types="vite/client" />
import type { i18n } from "i18next";
import messagesDe from "../i18n/de.json";
import messagesEn from "../i18n/en.json";
import messagesNbNo from "../i18n/nb-NO.json";
import { getAcceptHotI18n, getRawI18n, onI18nReady } from "facilmap-utils";
const namespace = "facilmap-leaflet";
onI18nReady((i18n) => {
i18n.addResourceBundle("en", namespace, messagesEn);
i18n.addResourceBundle("de", namespace, messagesDe);
i18n.addResourceBundle("nb-NO", namespace, messagesNbNo);
});
if (import.meta.hot) {
if (import.meta.hot) {
import.meta.hot!.accept(`../i18n/en.json`, getAcceptHotI18n("en", namespace));
import.meta.hot!.accept(`../i18n/de.json`, getAcceptHotI18n("de", namespace));
import.meta.hot!.accept(`../i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
}
}
export function getI18n(): Pick<i18n, "t"> {
return {
t: getRawI18n().getFixedT(null, namespace)
};
}

Wyświetl plik

@ -15,5 +15,5 @@
{ "path": "../types/tsconfig.json" },
{ "path": "../utils/tsconfig.json" }
],
"include": ["src/**/*", "example.html", "icontest.html"]
"include": ["src/**/*", "src/**/*.json", "example.html", "icontest.html"]
}

Wyświetl plik

@ -85,6 +85,16 @@ export function onI18nReady(callback: (i18n: i18n) => void): void {
}
}
export function getAcceptHotI18n(lang: string, namespace: string): (mod: any) => void {
return (mod: any) => {
if (mod) {
onI18nReady((i18n) => {
i18n.addResourceBundle(lang, namespace, mod!.default);
});
}
};
}
export function getCurrentLanguage(): string {
return getRawI18n().language;
}

Wyświetl plik

@ -1,6 +1,6 @@
/// <reference types="vite/client" />
import type { i18n } from "i18next";
import { getRawI18n, onI18nReady } from "./i18n-utils";
import { getAcceptHotI18n, getRawI18n, onI18nReady } from "./i18n-utils";
import messagesDe from "./i18n/de.json";
import messagesEn from "./i18n/en.json";
import messagesNbNo from "./i18n/nb-NO.json";
@ -15,16 +15,9 @@ onI18nReady((i18n) => {
if (import.meta.hot) {
if (import.meta.hot) {
const acceptHot = (lang: string) => (mod: any) => {
if (mod) {
onI18nReady((i18n) => {
i18n.addResourceBundle(lang, namespace, mod!.default);
});
}
};
import.meta.hot!.accept(`./i18n/en.json`, acceptHot("en"));
import.meta.hot!.accept(`./i18n/de.json`, acceptHot("de"));
import.meta.hot!.accept(`./i18n/nb-NO.json`, acceptHot("nb-NO"));
import.meta.hot!.accept(`./i18n/en.json`, getAcceptHotI18n("en", namespace));
import.meta.hot!.accept(`./i18n/de.json`, getAcceptHotI18n("de", namespace));
import.meta.hot!.accept(`./i18n/nb-NO.json`, getAcceptHotI18n("nb-NO", namespace));
}
}