2025-02-02 11:17:22 +01:00
|
|
|
import {
|
|
|
|
|
Landmark,
|
|
|
|
|
Icon,
|
|
|
|
|
Shell,
|
|
|
|
|
Bike,
|
|
|
|
|
Building,
|
|
|
|
|
Tent,
|
|
|
|
|
Car,
|
|
|
|
|
Wrench,
|
|
|
|
|
ShoppingBasket,
|
|
|
|
|
Droplet,
|
|
|
|
|
DoorOpen,
|
|
|
|
|
Trees,
|
|
|
|
|
Fuel,
|
|
|
|
|
Home,
|
|
|
|
|
Info,
|
|
|
|
|
TreeDeciduous,
|
|
|
|
|
CircleParking,
|
|
|
|
|
Cross,
|
|
|
|
|
Utensils,
|
|
|
|
|
Construction,
|
|
|
|
|
BrickWall,
|
|
|
|
|
ShowerHead,
|
|
|
|
|
Mountain,
|
|
|
|
|
Phone,
|
|
|
|
|
TrainFront,
|
|
|
|
|
Bed,
|
|
|
|
|
Binoculars,
|
|
|
|
|
TriangleAlert,
|
|
|
|
|
Anchor,
|
|
|
|
|
Toilet,
|
2025-06-21 21:07:36 +02:00
|
|
|
type IconProps,
|
|
|
|
|
} from '@lucide/svelte';
|
2025-02-02 11:17:22 +01:00
|
|
|
import {
|
|
|
|
|
Landmark as LandmarkSvg,
|
|
|
|
|
Shell as ShellSvg,
|
|
|
|
|
Bike as BikeSvg,
|
|
|
|
|
Building as BuildingSvg,
|
|
|
|
|
Tent as TentSvg,
|
|
|
|
|
Car as CarSvg,
|
|
|
|
|
Wrench as WrenchSvg,
|
|
|
|
|
ShoppingBasket as ShoppingBasketSvg,
|
|
|
|
|
Droplet as DropletSvg,
|
|
|
|
|
DoorOpen as DoorOpenSvg,
|
|
|
|
|
Trees as TreesSvg,
|
|
|
|
|
Fuel as FuelSvg,
|
|
|
|
|
Home as HomeSvg,
|
|
|
|
|
Info as InfoSvg,
|
|
|
|
|
TreeDeciduous as TreeDeciduousSvg,
|
|
|
|
|
CircleParking as CircleParkingSvg,
|
|
|
|
|
Cross as CrossSvg,
|
|
|
|
|
Utensils as UtensilsSvg,
|
|
|
|
|
Construction as ConstructionSvg,
|
|
|
|
|
BrickWall as BrickWallSvg,
|
|
|
|
|
ShowerHead as ShowerHeadSvg,
|
|
|
|
|
Mountain as MountainSvg,
|
|
|
|
|
Phone as PhoneSvg,
|
|
|
|
|
TrainFront as TrainFrontSvg,
|
|
|
|
|
Bed as BedSvg,
|
|
|
|
|
Binoculars as BinocularsSvg,
|
|
|
|
|
TriangleAlert as TriangleAlertSvg,
|
|
|
|
|
Anchor as AnchorSvg,
|
|
|
|
|
Toilet as ToiletSvg,
|
|
|
|
|
} from 'lucide-static';
|
2025-06-21 21:07:36 +02:00
|
|
|
import type { Component } from 'svelte';
|
2024-08-08 17:52:11 +02:00
|
|
|
|
|
|
|
|
export type Symbol = {
|
|
|
|
|
value: string;
|
2025-06-21 21:07:36 +02:00
|
|
|
icon?: Component<IconProps>;
|
2024-08-08 23:20:09 +02:00
|
|
|
iconSvg?: string;
|
2024-08-08 17:52:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const symbols: { [key: string]: Symbol } = {
|
2024-08-11 13:47:10 +02:00
|
|
|
alert: { value: 'Alert', icon: TriangleAlert, iconSvg: TriangleAlertSvg },
|
|
|
|
|
anchor: { value: 'Anchor', icon: Anchor, iconSvg: AnchorSvg },
|
2024-08-08 23:20:09 +02:00
|
|
|
bank: { value: 'Bank', icon: Landmark, iconSvg: LandmarkSvg },
|
|
|
|
|
beach: { value: 'Beach', icon: Shell, iconSvg: ShellSvg },
|
|
|
|
|
bike_trail: { value: 'Bike Trail', icon: Bike, iconSvg: BikeSvg },
|
2024-08-11 13:47:10 +02:00
|
|
|
binoculars: { value: 'Binoculars', icon: Binoculars, iconSvg: BinocularsSvg },
|
2024-08-08 17:52:11 +02:00
|
|
|
bridge: { value: 'Bridge' },
|
2024-08-08 23:20:09 +02:00
|
|
|
building: { value: 'Building', icon: Building, iconSvg: BuildingSvg },
|
|
|
|
|
campground: { value: 'Campground', icon: Tent, iconSvg: TentSvg },
|
|
|
|
|
car: { value: 'Car', icon: Car, iconSvg: CarSvg },
|
|
|
|
|
car_repair: { value: 'Car Repair', icon: Wrench, iconSvg: WrenchSvg },
|
2025-02-02 11:17:22 +01:00
|
|
|
convenience_store: {
|
|
|
|
|
value: 'Convenience Store',
|
|
|
|
|
icon: ShoppingBasket,
|
|
|
|
|
iconSvg: ShoppingBasketSvg,
|
|
|
|
|
},
|
2024-08-08 17:52:11 +02:00
|
|
|
crossing: { value: 'Crossing' },
|
2025-02-02 11:17:22 +01:00
|
|
|
department_store: {
|
|
|
|
|
value: 'Department Store',
|
|
|
|
|
icon: ShoppingBasket,
|
|
|
|
|
iconSvg: ShoppingBasketSvg,
|
|
|
|
|
},
|
2024-08-08 23:20:09 +02:00
|
|
|
drinking_water: { value: 'Drinking Water', icon: Droplet, iconSvg: DropletSvg },
|
|
|
|
|
exit: { value: 'Exit', icon: DoorOpen, iconSvg: DoorOpenSvg },
|
|
|
|
|
lodge: { value: 'Lodge', icon: Home, iconSvg: HomeSvg },
|
|
|
|
|
lodging: { value: 'Lodging', icon: Bed, iconSvg: BedSvg },
|
|
|
|
|
forest: { value: 'Forest', icon: Trees, iconSvg: TreesSvg },
|
|
|
|
|
gas_station: { value: 'Gas Station', icon: Fuel, iconSvg: FuelSvg },
|
2025-02-02 11:17:22 +01:00
|
|
|
ground_transportation: {
|
|
|
|
|
value: 'Ground Transportation',
|
|
|
|
|
icon: TrainFront,
|
|
|
|
|
iconSvg: TrainFrontSvg,
|
|
|
|
|
},
|
2024-08-08 23:20:09 +02:00
|
|
|
hotel: { value: 'Hotel', icon: Bed, iconSvg: BedSvg },
|
|
|
|
|
house: { value: 'House', icon: Home, iconSvg: HomeSvg },
|
|
|
|
|
information: { value: 'Information', icon: Info, iconSvg: InfoSvg },
|
|
|
|
|
park: { value: 'Park', icon: TreeDeciduous, iconSvg: TreeDeciduousSvg },
|
|
|
|
|
parking_area: { value: 'Parking Area', icon: CircleParking, iconSvg: CircleParkingSvg },
|
|
|
|
|
pharmacy: { value: 'Pharmacy', icon: Cross, iconSvg: CrossSvg },
|
|
|
|
|
picnic_area: { value: 'Picnic Area', icon: Utensils, iconSvg: UtensilsSvg },
|
|
|
|
|
restaurant: { value: 'Restaurant', icon: Utensils, iconSvg: UtensilsSvg },
|
|
|
|
|
restricted_area: { value: 'Restricted Area', icon: Construction, iconSvg: ConstructionSvg },
|
2024-11-18 21:08:30 +01:00
|
|
|
restroom: { value: 'Restroom', icon: Toilet, iconSvg: ToiletSvg },
|
2024-08-08 23:20:09 +02:00
|
|
|
road: { value: 'Road', icon: BrickWall, iconSvg: BrickWallSvg },
|
2024-08-11 13:47:10 +02:00
|
|
|
scenic_area: { value: 'Scenic Area', icon: Binoculars, iconSvg: BinocularsSvg },
|
|
|
|
|
shelter: { value: 'Shelter', icon: Tent, iconSvg: TentSvg },
|
2024-08-08 17:52:11 +02:00
|
|
|
shopping_center: { value: 'Shopping Center', icon: ShoppingBasket },
|
2024-08-08 23:20:09 +02:00
|
|
|
shower: { value: 'Shower', icon: ShowerHead, iconSvg: ShowerHeadSvg },
|
|
|
|
|
summit: { value: 'Summit', icon: Mountain, iconSvg: MountainSvg },
|
|
|
|
|
telephone: { value: 'Telephone', icon: Phone, iconSvg: PhoneSvg },
|
2024-08-08 17:52:11 +02:00
|
|
|
tunnel: { value: 'Tunnel' },
|
2024-08-08 23:20:09 +02:00
|
|
|
water_source: { value: 'Water Source', icon: Droplet, iconSvg: DropletSvg },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export function getSymbolKey(value: string | undefined): string | undefined {
|
|
|
|
|
if (value === undefined) {
|
|
|
|
|
return undefined;
|
|
|
|
|
} else {
|
2025-02-02 11:17:22 +01:00
|
|
|
return Object.keys(symbols).find((key) => symbols[key].value === value);
|
2024-08-08 23:20:09 +02:00
|
|
|
}
|
2025-02-02 11:17:22 +01:00
|
|
|
}
|