From 62956dd4b19fe1c95c3e167f8f9c00b4e3c3adbe Mon Sep 17 00:00:00 2001 From: sora-ext Date: Fri, 28 Feb 2025 17:49:41 +0100 Subject: [PATCH] Update src/client/api.ts --- src/client/api.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/client/api.ts b/src/client/api.ts index 674d920..8ac2945 100644 --- a/src/client/api.ts +++ b/src/client/api.ts @@ -78,14 +78,13 @@ export const is_restauration_type = (e: NominatimResult) => ["restaurant", "cafe", "pub", "bar", "fast_food", "food_court"].indexOf( e.type ) != -1; - export const is_attraction_type = (e: NominatimResult): boolean => [ "tourism", "leisure", "place", "amenity", - "highway", + // "highway", "historic", "natural", "waterway", @@ -95,10 +94,13 @@ export const is_attraction_type = (e: NominatimResult): boolean => "national_park", "nature_reserve", "protected_area", - ].indexOf(e.type) != -1; + ].indexOf(e.type) != -1 || is_travel_type(e); export const is_hotel_type = (e: NominatimResult): boolean => ["hotel", "hostel", "guest_house"].indexOf(e.type) != -1 +export const is_travel_type = (e: NominatimResult): boolean => + ["bus_stop", "tram_stop", "station", , "aerodrome", "parking"].indexOf(e.type) != -1 + export const icon_type = (item: string | NominatimResult): string => { if (typeof (item) == "string") { @@ -122,7 +124,7 @@ export const icon_type = (item: string | NominatimResult): string => { "place_of_worship", "attraction", "information", - "university", + "university", "theatre", "opera" ], mountain: ["peak", "viewpoint"], parking: ["parking"],