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"],