// The app's icons as inline SVG strings (fill currentColor, so CSS // colors them and gpx.js can recolor a copy for map markers). // Material Design Icons (Apache-2.0, public/vendor/mdi/) for the UI; // the National Park Service pictograms further down (CC0) for points. // bin/vendor-sync.mjs vendors only the mdi* names used in public/js/. import { mdiBacteriaOutline, mdiBugOutline, mdiClockOutline, mdiCloudDownloadOutline, mdiContentSaveOutline, mdiCrosshairsGps, mdiDeleteSweepOutline, mdiFolderPlusOutline, mdiLayersOutline, mdiLayersPlus, mdiMagnify, mdiMapMarkerOutline, mdiMapMarkerPath, mdiMapMarkerPlusOutline, mdiMapMarkerRadiusOutline, mdiMapMarkerStarOutline, mdiPuzzleOutline, mdiRadar, mdiRoutes, mdiRuler, mdiSunAngleOutline, mdiSwapVertical, mdiTrayArrowDown, mdiTrayArrowUp, mdiWeatherSunsetDown, mdiWeatherSunsetUp, mdiWikipedia, } from "/vendor/mdi/mdi.mjs"; const mdi = (path) => ``; export const LAYERS_ICON = mdi(mdiLayersOutline); export const OVERLAYS_ICON = mdi(mdiLayersPlus); export const NOTE_PIN_ICON = mdi(mdiMapMarkerPlusOutline); export const GPX_ICON = mdi(mdiMapMarkerPath); export const GNSS_ICON = mdi(mdiCrosshairsGps); export const RULER_ICON = mdi(mdiRuler); export const SUNRISE_ICON = mdi(mdiWeatherSunsetUp); export const SUNSET_ICON = mdi(mdiWeatherSunsetDown); export const SEARCH_ICON = mdi(mdiMagnify); export const NEW_FOLDER_ICON = mdi(mdiFolderPlusOutline); export const UPLOAD_ICON = mdi(mdiTrayArrowUp); export const PLUGIN_ICON = mdi(mdiPuzzleOutline); export const WAYPOINT_ICON = mdi(mdiMapMarkerOutline); export const PENDING_ICON = mdi(mdiClockOutline); export const DOWNLOAD_ICON = mdi(mdiTrayArrowDown); export const ROUTE_ICON = mdi(mdiRoutes); export const RADAR_CLOUD_ICON = mdi(mdiRadar); export const TERRAIN_SHADOW_ICON = mdi(mdiSunAngleOutline); export const CONTOUR_ICON = mdi(mdiBacteriaOutline); export const OFFLINE_DATA_ICON = mdi(mdiCloudDownloadOutline); export const DEBUG_ICON = mdi(mdiBugOutline); export const WIKI_ICON = mdi(mdiWikipedia); export const LIVETRACK_ICON = mdi(mdiMapMarkerRadiusOutline); export const POSITION_ICON = mdi(mdiCrosshairsGps); export const SAVED_POINT_ICON = mdi(mdiMapMarkerStarOutline); export const REVERSE_ICON = mdi(mdiSwapVertical); export const CLEAR_ICON = mdi(mdiDeleteSweepOutline); export const SAVE_ICON = mdi(mdiContentSaveOutline); export const TRACK_ICON = GPX_ICON; // A rounded-square badge — used as the map marker for individual waypoints, // tinted by category color via icon-color (see gpx.js). Not a plain dot, // which blended in with a base map style's own small circular POI icons, // and not a pin/teardrop either — a rounded square is the National Park // Service's own convention for framing these exact category symbols // (POI_ICONS below), so pairing the two looks native rather than like two // mismatched icon styles. Centered on the coordinate (no tip to anchor at), // which also means the category glyph on top needs no offset — both layers // just share the same center anchor at [0, 0]. export const MAP_MARKER_ICON = ` `; // POI category glyphs (park4night/OsmAnd exports), keyed by the OsmAnd icon // name a file's extension carries — a small curated set for // the categories park4night actually uses (see waypoint_style in // lib/maptool/gpx.rb), not an exhaustive OsmAnd icon set. // // These are the National Park Service's own map pictograms, not // hand-drawn — a professional, widely-recognized icon set built for // exactly this job (small monochrome map markers) beats reinventing "fuel // pump"/"picnic table" glyphs from scratch. Pulled from // github.com/nationalparkservice/npmap5-plugins's bundled `symbol-library` // (src/-22.svg) — an actively-maintained monorepo that's the // designated replacement for the same org's older standalone // `symbol-library` repo (confirmed by its maintainer: // github.com/nationalparkservice/npmap5-plugins/issues/4), with a much // larger icon vocabulary. CC0-licensed (public domain) — no attribution // required. // // All filled shapes — these render at ~14px on the map, where a hairline // stroke disappears — and rasterized (non-SDF; a plain colored raster, not // tinted at render time, see gpx.js's _registerCategoryGlyphs) so only the // alpha shape matters, not the actual `currentColor` value. // src/wilderness-22.svg — exported (unlike BICYCLE_TRAIL_ICON below, this // one's also used outside this file) as the Overlays panel's Terrain // shading glyph (overlays.js): the closest honest match in NPS's set for // "mountains/terrain" — it has no weather or elevation-specific pictogram. export const WILDERNESS_ICON = ` `; // src/bicycle-trail-22.svg — pulled out to its own constant since it's also // used unrasterized, inline, as PARK4NIGHT_TAGS.vtt below. const BICYCLE_TRAIL_ICON = ` `; // src/store-22.svg — NPS's generic shop pictogram, the closest match in // their set for both a supermarket and a convenience store (no separate // grocery-specific glyph exists there). const STORE_ICON = ` `; export const POI_ICONS = { // src/parking-22.svg amenity_parking: ` `, // src/campground-22.svg tourism_camp_site: ` `, // src/picnic-area-22.svg leisure_picnic_table: ` `, // src/gas-station-22.svg amenity_fuel: ` `, // src/lodging-22.svg tourism_hotel: ` `, // src/wilderness-22.svg forest: WILDERNESS_ICON, // src/bicycle-trail-22.svg sport_cycling: BICYCLE_TRAIL_ICON, }; // National Park Service map symbols (same source/license as POI_ICONS above) // used as small inline glyphs next to a park4night waypoint's Services/ // Activities tags (see PARK4NIGHT_TAGS and formatDescription in // public/js/gpx.js) — pulled into named constants first since a few codes // share the same real-world facility (eau_noire/eau_usee are both a dump // station, gaz/gpl are both a propane refill, peche/peche_pied are both // fishing) and BICYCLE_TRAIL_ICON is also POI_ICONS.sport_cycling above. const PETS_ON_LEASH_ICON = ` `; const SHOWERS_ICON = ` `; const SANITARY_DISPOSAL_ICON = ` `; const ELECTRICAL_HOOKUP_ICON = ` `; const PROPANE_ICON = ` `; const LAUNDRY_ICON = ` `; const SWIMMING_ICON = ` `; const DRINKING_WATER_ICON = ` `; const TRASH_DUMPSTER_ICON = ` `; const RESTROOMS_ICON = ` `; const RIVER_RAFTING_ICON = ` `; const CLIMBING_ICON = ` `; const PLAYGROUND_ICON = ` `; const MOTOR_BIKE_TRAIL_ICON = ` `; const FISHING_ICON = ` `; const SCENIC_VIEWPOINT_ICON = ` `; // Exported (unlike the other POI glyphs around it) — also used as the // Overlays panel's Hiking trails glyph (hiking_trails.js), same "reuse an // existing NPS-sourced pictogram" story as WILDERNESS_ICON above rather // than hand-drawing another one. export const WALKING_ICON = ` `; const GUIDED_TOURS_ICON = ` `; const WIND_SURFING_ICON = ` `; // These three have no equivalent in the older standalone symbol-library // repo (see POI_ICONS above) — pulled from npmap5-plugins' bundled, // actively-maintained symbol-library instead (CC0-licensed), which has a // much larger vocabulary. const WIFI_ICON = ` `; const CELLULAR_SIGNAL_ICON = ` `; const WINTER_RECREATION_AREA_ICON = ` `; // park4night's fixed vocabulary of Services/Activities codes (the ones // p4n2gpx exports actually use — not necessarily park4night's entire API), // each with a human label (always shown) and an icon where the NPS set has // a reasonable match. formatDescription (public/js/gpx.js) reads this; // an unrecognized code just renders as its raw text, same as before this // existed, so nothing p4n2gpx might add later is ever hidden. export const PARK4NIGHT_TAGS = { // Services animaux: { icon: PETS_ON_LEASH_ICON, label: "Pets allowed" }, boulangerie: { label: "Bakery nearby" }, caravaneige: { icon: WINTER_RECREATION_AREA_ICON, label: "Winter/snow camping" }, donnees_mobile: { icon: CELLULAR_SIGNAL_ICON, label: "Mobile data coverage" }, douche: { icon: SHOWERS_ICON, label: "Showers" }, eau_noire: { icon: SANITARY_DISPOSAL_ICON, label: "Black water disposal" }, eau_usee: { icon: SANITARY_DISPOSAL_ICON, label: "Grey water disposal" }, electricite: { icon: ELECTRICAL_HOOKUP_ICON, label: "Electricity" }, gaz: { icon: PROPANE_ICON, label: "Gas/propane refill" }, gpl: { icon: PROPANE_ICON, label: "LPG refill" }, lavage: { label: "Vehicle wash" }, laverie: { icon: LAUNDRY_ICON, label: "Laundry" }, piscine: { icon: SWIMMING_ICON, label: "Swimming pool" }, point_eau: { icon: DRINKING_WATER_ICON, label: "Drinking water" }, poubelle: { icon: TRASH_DUMPSTER_ICON, label: "Trash disposal" }, wc_public: { icon: RESTROOMS_ICON, label: "Public toilet" }, wifi: { icon: WIFI_ICON, label: "Wi-Fi" }, // Activities baignade: { icon: SWIMMING_ICON, label: "Swimming" }, eaux_vives: { icon: RIVER_RAFTING_ICON, label: "Whitewater sports" }, escalade: { icon: CLIMBING_ICON, label: "Climbing" }, jeux_enfants: { icon: PLAYGROUND_ICON, label: "Playground" }, moto: { icon: MOTOR_BIKE_TRAIL_ICON, label: "Motorcycling" }, peche: { icon: FISHING_ICON, label: "Fishing" }, peche_pied: { icon: FISHING_ICON, label: "Shore fishing" }, point_de_vue: { icon: SCENIC_VIEWPOINT_ICON, label: "Scenic viewpoint" }, rando: { icon: WALKING_ICON, label: "Hiking" }, visites: { icon: GUIDED_TOURS_ICON, label: "Sightseeing" }, vtt: { icon: BICYCLE_TRAIL_ICON, label: "Mountain biking" }, windsurf: { icon: WIND_SURFING_ICON, label: "Windsurfing" }, }; // Extends POI_ICONS (and so POI_ICON_KEYS, and what a marker badge can // show — see gpx.js's _registerCategoryGlyphs) with a handful of the same // symbols PARK4NIGHT_TAGS above already vendors, reused rather than // duplicated — this app's own hand-drawn notes (notes.js's icon picker) // need marker-badge glyphs for "water source"/"dump station"/"viewpoint" // far more than the original OSM-POI-upload set (parking/hotel/fuel) ever // covered. Object.assign, not more entries in the POI_ICONS literal // itself, since these constants are declared below it in this file. Object.assign(POI_ICONS, { amenity_drinking_water: DRINKING_WATER_ICON, amenity_sanitary_dump_station: SANITARY_DISPOSAL_ICON, amenity_toilets: RESTROOMS_ICON, shop_gas: PROPANE_ICON, amenity_electricity: ELECTRICAL_HOOKUP_ICON, shop_laundry: LAUNDRY_ICON, leisure_playground: PLAYGROUND_ICON, tourism_viewpoint: SCENIC_VIEWPOINT_ICON, leisure_swimming: SWIMMING_ICON, leisure_fishing: FISHING_ICON, sport_climbing: CLIMBING_ICON, route_hiking: WALKING_ICON, shop_supermarket: STORE_ICON, shop_convenience: STORE_ICON, });