// Small hand-authored monoline SVG icons for the sidebar, so the app // doesn't need to vendor an icon font/library for four glyphs. export const LAYERS_ICON = ` `; // Two overlapping circles — distinct from LAYERS_ICON's stacked-planes // look (that one picks a *base* map; this one is for the sidebar flyout // toggling live overlay layers, e.g. Wikipedia, on top of whichever base // map is showing) while still reading as "layers combining." export const OVERLAYS_ICON = ` `; export const HILLSHADE_ICON = ` `; export const NOTE_PIN_ICON = ` `; export const GPX_ICON = ` `; export const RADAR_ICON = ` `; export const GNSS_ICON = ` `; export const RULER_ICON = ` `; export const NEW_FOLDER_ICON = ` `; export const UPLOAD_ICON = ` `; // The inverse of UPLOAD_ICON (arrow into the tray, not out of it) — used // for the import plugins panel (plugins.js), which pulls data in from // somewhere else rather than sending a file out. export const PLUGIN_ICON = ` `; // Shown next to each file in the GPX tree, indicating whether it has // waypoints, a track, or both. export const WAYPOINT_ICON = ` `; export const TRACK_ICON = GPX_ICON; // Shown next to a file whose GeoJSON conversion is NOT yet cached on disk // (GpxStore#geojson) — the uncommon case, since GpxStore#save converts // eagerly at upload time; this only happens for a .gpx/.fit dropped // straight into data/gpx/ on the filesystem, bypassing the app, and not // yet opened. Everything uploaded normally is cached almost immediately, // so badging the common case would just be noise — this badges the // exception instead. export const PENDING_ICON = ` `; // A small download button next to each tree file's delete button — the // name link (see gpx.js's _renderFile) does the same thing, but isn't // obviously clickable at a glance, so this is the discoverable version. export const DOWNLOAD_ICON = ` `; // Same shape as TRACK_ICON, dashed — a route is planned rather than // recorded, the same visual convention most map apps use for the // distinction. export const ROUTE_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/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: ` `, // 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 = ` `; 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, }); // src/bookstore-22.svg (NPS symbol library, same source/license as // POI_ICONS above) — used as the fixed marker glyph for the "Wikipedia" // map layer (gpx.js), not part of POI_ICONS itself: that set is keyed by // OSM/p4n2gpx category and doubles as the note icon-picker's option list // (notes.js), neither of which applies here — every point on this layer // gets the same one glyph, there's no per-feature category to key it by. export const WIKI_ICON = ` `; export const LIVETRACK_ICON = ` `;