dev #160
@ -78,14 +78,13 @@ export const is_restauration_type = (e: NominatimResult) =>
|
|||||||
["restaurant", "cafe", "pub", "bar", "fast_food", "food_court"].indexOf(
|
["restaurant", "cafe", "pub", "bar", "fast_food", "food_court"].indexOf(
|
||||||
e.type
|
e.type
|
||||||
) != -1;
|
) != -1;
|
||||||
|
|
||||||
export const is_attraction_type = (e: NominatimResult): boolean =>
|
export const is_attraction_type = (e: NominatimResult): boolean =>
|
||||||
[
|
[
|
||||||
"tourism",
|
"tourism",
|
||||||
"leisure",
|
"leisure",
|
||||||
"place",
|
"place",
|
||||||
"amenity",
|
"amenity",
|
||||||
"highway",
|
// "highway",
|
||||||
"historic",
|
"historic",
|
||||||
"natural",
|
"natural",
|
||||||
"waterway",
|
"waterway",
|
||||||
@ -95,10 +94,13 @@ export const is_attraction_type = (e: NominatimResult): boolean =>
|
|||||||
"national_park",
|
"national_park",
|
||||||
"nature_reserve",
|
"nature_reserve",
|
||||||
"protected_area",
|
"protected_area",
|
||||||
].indexOf(e.type) != -1;
|
].indexOf(e.type) != -1 || is_travel_type(e);
|
||||||
|
|
||||||
export const is_hotel_type = (e: NominatimResult): boolean =>
|
export const is_hotel_type = (e: NominatimResult): boolean =>
|
||||||
["hotel", "hostel", "guest_house"].indexOf(e.type) != -1
|
["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 => {
|
export const icon_type = (item: string | NominatimResult): string => {
|
||||||
if (typeof (item) == "string") {
|
if (typeof (item) == "string") {
|
||||||
@ -122,7 +124,7 @@ export const icon_type = (item: string | NominatimResult): string => {
|
|||||||
"place_of_worship",
|
"place_of_worship",
|
||||||
"attraction",
|
"attraction",
|
||||||
"information",
|
"information",
|
||||||
"university",
|
"university", "theatre", "opera"
|
||||||
],
|
],
|
||||||
mountain: ["peak", "viewpoint"],
|
mountain: ["peak", "viewpoint"],
|
||||||
parking: ["parking"],
|
parking: ["parking"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user