Material Design Icons replace the hand-drawn UI icons (only the used ones vendored, Renovate-tracked); route panel: saved-point picker, buttons on two rows with icons
This commit is contained in:
1 parent
a6d63e242b
commit
4c704045c5
10 files changed
+251
-206
No files matched your search
+19
-1
@@ -5,7 +5,7 @@
|
|||||||
// its PR carries the new files too. Manually: `npm ci && node bin/vendor-sync.mjs`.
|
// its PR carries the new files too. Manually: `npm ci && node bin/vendor-sync.mjs`.
|
||||||
// Assets not on npm: fonts and the Liberty style/sprite go through
|
// Assets not on npm: fonts and the Liberty style/sprite go through
|
||||||
// bin/assets-sync.mjs, the NPS plugins are updated by hand.
|
// bin/assets-sync.mjs, the NPS plugins are updated by hand.
|
||||||
import { copyFileSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
import { copyFileSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
||||||
|
|
||||||
const root = new URL("..", import.meta.url).pathname;
|
const root = new URL("..", import.meta.url).pathname;
|
||||||
const nm = (p) => `${root}node_modules/${p}`;
|
const nm = (p) => `${root}node_modules/${p}`;
|
||||||
@@ -30,3 +30,21 @@ copy("suncalc/LICENSE", "suncalc/LICENSE");
|
|||||||
|
|
||||||
// Only the flags already vendored (the European subset), not all ~270.
|
// Only the flags already vendored (the European subset), not all ~270.
|
||||||
for (const f of readdirSync(vendor("flag-icons/1x1"))) copy(`flag-icons/flags/1x1/${f}`, `flag-icons/1x1/${f}`);
|
for (const f of readdirSync(vendor("flag-icons/1x1"))) copy(`flag-icons/flags/1x1/${f}`, `flag-icons/1x1/${f}`);
|
||||||
|
|
||||||
|
// Material Design Icons: only the mdi* names public/js/ actually uses (the
|
||||||
|
// whole set is ~3 MB), as one small ES module. Using another icon is just
|
||||||
|
// naming it in the code and running this again.
|
||||||
|
const mdi = await import(nm("@mdi/js/mdi.js"));
|
||||||
|
const used = new Set();
|
||||||
|
for (const f of readdirSync(`${root}public/js`)) {
|
||||||
|
if (f.endsWith(".js")) for (const [name] of readFileSync(`${root}public/js/${f}`, "utf8").matchAll(/\bmdi[A-Z]\w*/g)) used.add(name);
|
||||||
|
}
|
||||||
|
const missing = [...used].filter((name) => !mdi[name]);
|
||||||
|
if (missing.length) throw new Error(`not in @mdi/js: ${missing.join(", ")}`);
|
||||||
|
mkdirSync(vendor("mdi"), { recursive: true });
|
||||||
|
writeFileSync(
|
||||||
|
vendor("mdi/mdi.mjs"),
|
||||||
|
`// Generated by bin/vendor-sync.mjs from @mdi/js ${JSON.parse(readFileSync(nm("@mdi/js/package.json"), "utf8")).version}, Apache-2.0 (LICENSE).\n` +
|
||||||
|
[...used].sort().map((name) => `export const ${name} = "${mdi[name]}";\n`).join(""),
|
||||||
|
);
|
||||||
|
copy("@mdi/js/LICENSE", "mdi/LICENSE");
|
||||||
@@ -65,6 +65,14 @@ build, minus the trailing `sourceMappingURL` comment
|
|||||||
| https://github.com/c0nsumer/maplibre-gl-lanes
|
| https://github.com/c0nsumer/maplibre-gl-lanes
|
||||||
|===
|
|===
|
||||||
|
|
||||||
|
Also vendored under `public/vendor/mdi/` — Apache-2.0 (`LICENSE`
|
||||||
|
included alongside): the Material Design Icons (`@mdi/js`, version in
|
||||||
|
`package.json`, https://github.com/Templarian/MaterialDesign-JS) that
|
||||||
|
`public/js/icons.js` uses for the app's own UI icons. Only the icons
|
||||||
|
actually used are vendored, as `mdi.mjs`, generated by
|
||||||
|
`bin/vendor-sync.mjs`. The point and park4night glyphs stay the
|
||||||
|
National Park Service's (below).
|
||||||
|
|
||||||
Also vendored under `public/vendor/` — MIT-licensed (© 2013 Panayiotis
|
Also vendored under `public/vendor/` — MIT-licensed (© 2013 Panayiotis
|
||||||
Lipiridis), attribution required (this notice satisfies that):
|
Lipiridis), attribution required (this notice satisfies that):
|
||||||
|
|
||||||
@@ -177,7 +185,7 @@ terrain.pmtiles regeneration.
|
|||||||
|===
|
|===
|
||||||
|
|
||||||
Versions of the npm-published libraries above (MapLibre GL JS, pmtiles,
|
Versions of the npm-published libraries above (MapLibre GL JS, pmtiles,
|
||||||
maplibre-contour, maplibre-gl-lanes, flag-icons, SunCalc) are pinned in
|
maplibre-contour, maplibre-gl-lanes, flag-icons, SunCalc, Material Design Icons) are pinned in
|
||||||
`package.json` — the only thing it's for, the app itself has no JS
|
`package.json` — the only thing it's for, the app itself has no JS
|
||||||
build step. Renovate (`renovate.json`) opens a PR per bump and its
|
build step. Renovate (`renovate.json`) opens a PR per bump and its
|
||||||
`postUpgradeTasks` run `npm ci` + `node bin/vendor-sync.mjs`, so the PR
|
`postUpgradeTasks` run `npm ci` + `node bin/vendor-sync.mjs`, so the PR
|
||||||
|
|||||||
Generated
+8
@@ -6,6 +6,7 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "maptool-vendor",
|
"name": "maptool-vendor",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@mdi/js": "7.4.47",
|
||||||
"flag-icons": "7.6.0",
|
"flag-icons": "7.6.0",
|
||||||
"maplibre-contour": "0.1.1",
|
"maplibre-contour": "0.1.1",
|
||||||
"maplibre-gl": "6.18.0",
|
"maplibre-gl": "6.18.0",
|
||||||
@@ -109,6 +110,13 @@
|
|||||||
"pbf": "^5.1.2"
|
"pbf": "^5.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@mdi/js": {
|
||||||
|
"version": "7.4.47",
|
||||||
|
"resolved": "https://registry.npmjs.org/@mdi/js/-/js-7.4.47.tgz",
|
||||||
|
"integrity": "sha512-KPnNOtm5i2pMabqZxpUz7iQf+mfrYZyKCZ8QNz85czgEt7cuHcGorWfdzUMWYA0SD+a6Hn4FmJ+YhzzzjkTZrQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0"
|
||||||
|
},
|
||||||
"node_modules/@types/geojson": {
|
"node_modules/@types/geojson": {
|
||||||
"version": "7946.0.16",
|
"version": "7946.0.16",
|
||||||
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
|
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"description": "Version pins for public/vendor/ only, synced by bin/vendor-sync.mjs. Not a build step, the app serves the vendored copies.",
|
"description": "Version pins for public/vendor/ only, synced by bin/vendor-sync.mjs. Not a build step, the app serves the vendored copies.",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@mdi/js": "7.4.47",
|
||||||
"flag-icons": "7.6.0",
|
"flag-icons": "7.6.0",
|
||||||
"maplibre-contour": "0.1.1",
|
"maplibre-contour": "0.1.1",
|
||||||
"maplibre-gl": "6.18.0",
|
"maplibre-gl": "6.18.0",
|
||||||
|
|||||||
@@ -2315,6 +2315,52 @@ html, body {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.route-panel__buttons button {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-panel__buttons svg {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
flex: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-panel__saved {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-panel__saved input {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-panel__saved ul {
|
||||||
|
list-style: none;
|
||||||
|
margin: 4px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
max-height: 200px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-panel__saved li button {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
border: none;
|
||||||
|
background: none;
|
||||||
|
padding: 4px 6px;
|
||||||
|
font: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.route-panel__saved li button:hover,
|
||||||
|
.route-panel__saved li button:focus-visible {
|
||||||
|
background: #eef3fb;
|
||||||
|
}
|
||||||
|
|
||||||
.route-panel__buttons button[hidden] {
|
.route-panel__buttons button[hidden] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
+63
-202
@@ -1,136 +1,70 @@
|
|||||||
// Small hand-authored monoline SVG icons for the sidebar, so the app
|
// The app's icons as inline SVG strings (fill currentColor, so CSS
|
||||||
// doesn't need to vendor an icon font/library for four glyphs.
|
// 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";
|
||||||
|
|
||||||
export const LAYERS_ICON = `
|
const mdi = (path) => `<svg viewBox="0 0 24 24"><path fill="currentColor" d="${path}"/></svg>`;
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round">
|
|
||||||
<path d="M12 3 2 9l10 6 10-6-10-6z"/>
|
|
||||||
<path d="M2 14l10 6 10-6"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// 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 = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round">
|
|
||||||
<circle cx="9" cy="12" r="6"/>
|
|
||||||
<circle cx="15" cy="12" r="6"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const NOTE_PIN_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M12 21s7-7.58 7-12a7 7 0 0 0-14 0c0 4.42 7 12 7 12z"/>
|
|
||||||
<path d="M12 6.5v5M9.5 9h5"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const GPX_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<circle cx="5" cy="6" r="2"/>
|
|
||||||
<circle cx="19" cy="18" r="2"/>
|
|
||||||
<path d="M6.5 7.5C10 11 8 13 12 13s2 5 6.5 5"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const GNSS_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round">
|
|
||||||
<circle cx="12" cy="12" r="5.5"/>
|
|
||||||
<circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none"/>
|
|
||||||
<path d="M12 2v3M12 19v3M2 12h3M19 12h3"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const RULER_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round">
|
|
||||||
<path d="M4 15 15 4l5 5-11 11-5-5z"/>
|
|
||||||
<path d="M9 10l1.5 1.5M12 7l1.5 1.5M15 4l1.5 1.5M6 13l1.5 1.5"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// Toolbar readout glyphs (public/js/sun.js's text, assembled with these by
|
|
||||||
// map.js) — same monoline style as the sidebar icons above, no NPS source
|
|
||||||
// for either (that set has no sunrise/sunset pictogram).
|
|
||||||
export const SUNRISE_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M3 18h18"/>
|
|
||||||
<path d="M6 18a6 6 0 0 1 12 0"/>
|
|
||||||
<path d="M12 13V5"/>
|
|
||||||
<path d="M9 8l3-3 3 3"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const SUNSET_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M3 18h18"/>
|
|
||||||
<path d="M6 18a6 6 0 0 1 12 0"/>
|
|
||||||
<path d="M12 5v8"/>
|
|
||||||
<path d="M9 10l3 3 3-3"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const SEARCH_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<circle cx="11" cy="11" r="7"/>
|
|
||||||
<path d="M20 20l-4.35-4.35"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const NEW_FOLDER_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7z"/>
|
|
||||||
<path d="M12 11v5M9.5 13.5h5"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const UPLOAD_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M12 15V4M8 8l4-4 4 4"/>
|
|
||||||
<path d="M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// 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 = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M12 4v11M8 11l4 4 4-4"/>
|
|
||||||
<path d="M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// Shown next to each file in the GPX tree, indicating whether it has
|
|
||||||
// waypoints, a track, or both.
|
|
||||||
export const WAYPOINT_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M12 21s7-7.58 7-12a7 7 0 0 0-14 0c0 4.42 7 12 7 12z"/>
|
|
||||||
<circle cx="12" cy="9" r="2.2"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
|
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;
|
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 = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<circle cx="12" cy="12" r="8"/>
|
|
||||||
<path d="M12 8v4l3 2"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// 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 = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M12 4v11M8 11l4 4 4-4"/>
|
|
||||||
<path d="M4 15v3a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// 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 = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<circle cx="5" cy="6" r="2"/>
|
|
||||||
<circle cx="19" cy="18" r="2"/>
|
|
||||||
<path d="M6.5 7.5C10 11 8 13 12 13s2 5 6.5 5" stroke-dasharray="2 2.2"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// A rounded-square badge — used as the map marker for individual waypoints,
|
// 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,
|
// 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,
|
// which blended in with a base map style's own small circular POI icons,
|
||||||
@@ -172,39 +106,6 @@ export const MAP_MARKER_ICON = `
|
|||||||
export const WILDERNESS_ICON = `
|
export const WILDERNESS_ICON = `
|
||||||
<svg viewBox="0 0 22 22" fill="currentColor"><polygon points="18,18 13,15 17,15 13,11 16,11 12,7 15,7 12,4 14,4 11,0 8,4 10,4 7,7 10,7 6,11 9,11 5,15 9,15 4,18 10,18 10,22 12,22 12,18 "/></svg>`;
|
<svg viewBox="0 0 22 22" fill="currentColor"><polygon points="18,18 13,15 17,15 13,11 16,11 12,7 15,7 12,4 14,4 11,0 8,4 10,4 7,7 10,7 6,11 9,11 5,15 9,15 4,18 10,18 10,22 12,22 12,18 "/></svg>`;
|
||||||
|
|
||||||
// Hand-drawn, not NPS-sourced — that set has no weather/precipitation
|
|
||||||
// pictogram to reuse for the Overlays panel's Radar item, unlike Wikipedia
|
|
||||||
// (WIKI_ICON) and Terrain shading (WILDERNESS_ICON) above.
|
|
||||||
export const RADAR_CLOUD_ICON = `
|
|
||||||
<svg viewBox="0 0 22 22" fill="currentColor">
|
|
||||||
<path d="M17,10.1c-0.4-3-2.9-5.3-6-5.3c-2.5,0-4.7,1.5-5.6,3.8C3.4,8.9,1,11.1,1,13.9C1,16.7,3.3,19,6.1,19h10.3
|
|
||||||
c2.5,0,4.6-2,4.6-4.5C21,12.2,19.3,10.4,17,10.1z"/>
|
|
||||||
<rect x="6" y="20" width="1.6" height="2"/>
|
|
||||||
<rect x="10.2" y="20" width="1.6" height="2"/>
|
|
||||||
<rect x="14.4" y="20" width="1.6" height="2"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// Hand-drawn, not NPS-sourced — same story as RADAR_CLOUD_ICON above, no
|
|
||||||
// terrain-shadow/sun-behind-a-ridge pictogram in that set either. Used as
|
|
||||||
// the Overlays panel's Terrain shadow glyph (shadow.js via overlays.js).
|
|
||||||
export const TERRAIN_SHADOW_ICON = `
|
|
||||||
<svg viewBox="0 0 22 22" fill="currentColor">
|
|
||||||
<circle cx="16" cy="6" r="3"/>
|
|
||||||
<polygon points="0,19 6,9 9,13 13,6 22,19"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// Hand-drawn, not NPS-sourced — no contour-line pictogram in that set
|
|
||||||
// either. Concentric rings via fill-rule evenodd, same solid-glyph
|
|
||||||
// convention as WILDERNESS_ICON/RADAR_CLOUD_ICON/TERRAIN_SHADOW_ICON above —
|
|
||||||
// used as the Overlays panel's Contour lines glyph (contour.js).
|
|
||||||
export const CONTOUR_ICON = `
|
|
||||||
<svg viewBox="0 0 22 22" fill="currentColor" fill-rule="evenodd">
|
|
||||||
<path d="M21,11 A10,10 0 1,0 1,11 A10,10 0 1,0 21,11 Z
|
|
||||||
M18.5,11 A7.5,7.5 0 1,0 3.5,11 A7.5,7.5 0 1,0 18.5,11 Z
|
|
||||||
M16,11 A5,5 0 1,0 6,11 A5,5 0 1,0 16,11 Z
|
|
||||||
M13.5,11 A2.5,2.5 0 1,0 8.5,11 A2.5,2.5 0 1,0 13.5,11 Z"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// src/bicycle-trail-22.svg — pulled out to its own constant since it's also
|
// src/bicycle-trail-22.svg — pulled out to its own constant since it's also
|
||||||
// used unrasterized, inline, as PARK4NIGHT_TAGS.vtt below.
|
// used unrasterized, inline, as PARK4NIGHT_TAGS.vtt below.
|
||||||
const BICYCLE_TRAIL_ICON = `
|
const BICYCLE_TRAIL_ICON = `
|
||||||
@@ -420,43 +321,3 @@ Object.assign(POI_ICONS, {
|
|||||||
shop_convenience: STORE_ICON,
|
shop_convenience: STORE_ICON,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Hand-drawn, not NPS-sourced — no "download offline map data" pictogram
|
|
||||||
// in that set either. A tray with a downward arrow into it, same solid
|
|
||||||
// 22x22 currentColor convention as CONTOUR_ICON/TERRAIN_SHADOW_ICON above
|
|
||||||
// — used for the "Offline data" sidebar icon (offline_data.js).
|
|
||||||
export const OFFLINE_DATA_ICON = `
|
|
||||||
<svg viewBox="0 0 22 22" fill="currentColor">
|
|
||||||
<path d="M10,0h2v10.5l3-3l1.4,1.4L11,14.3L5.6,8.9L7,7.5l3,3V0z"/>
|
|
||||||
<path d="M2,15h18v2H2z M2,18h18v2H2z"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
// 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.
|
|
||||||
// A bug — the status/debug panel (debug.js).
|
|
||||||
export const DEBUG_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
|
|
||||||
<rect x="7" y="7" width="10" height="13" rx="5"/>
|
|
||||||
<path d="M9 7a3 3 0 0 1 6 0M12 11v9M3 13h4M17 13h4M4 7l3 2M20 7l-3 2M4 19l3-2M20 19l-3-2"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const WIKI_ICON = `
|
|
||||||
<svg viewBox="0 0 22 22" fill="currentColor">
|
|
||||||
<path d="M16.6,20.7c-0.6,0-0.9-0.4-0.9-0.9c0-0.5,0.3-0.9,0.9-0.9c0.3,0,0.5-0.2,0.5-0.5
|
|
||||||
S16.9,18,16.6,18c-1.1,0-1.9,0.8-1.9,1.9c0,1,0.7,1.9,1.9,1.9c0.3,0,0.5-0.2,0.5-0.5S16.9,20.7,16.6,20.7L16.6,20.7z"/>
|
|
||||||
<path d="M5,18c0,0,0,0,0,0c0,3.1,0.5,4,2.7,4l8.9,0c0.3,0,0.5-0.2,0.5-0.5
|
|
||||||
c0-0.3-0.2-0.5-0.5-0.5H8c-1.5,0-2-0.5-2-3c0,0,0,0,0-0.1c0-0.3-0.2-0.5-0.5-0.5S5,17.7,5,18L5,18z"/>
|
|
||||||
<path d="M5,8c0-0.6,5-5,5-5h5h1c0.6,0,1,0.4,1,1v14c0,0.6-0.4,1-1,1H6c-0.6,0-1-0.4-1-1
|
|
||||||
V8z M9,4L6,18c0,0,10,0,10,0c0,0,0-14,0-14C16,4,9,4,9,4z"/>
|
|
||||||
<path d="M5,6.8c0-0.5,0.4-1.3,0.8-1.6l6.4-4.7C12.7,0.2,13,0.4,13,1v10
|
|
||||||
c0,0.6-0.3,1.7-0.7,2.1l-6.5,5.3C5.4,18.8,5,18.6,5,18V6.8z"/>
|
|
||||||
</svg>`;
|
|
||||||
|
|
||||||
export const LIVETRACK_ICON = `
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
||||||
<path d="M12 21s7-7.58 7-12a7 7 0 0 0-14 0c0 4.42 7 12 7 12z"/>
|
|
||||||
<path d="M8.5 9a3.5 3.5 0 0 1 7 0" stroke-dasharray="1.5 2.2"/>
|
|
||||||
</svg>`;
|
|
||||||
+48
-1
@@ -1,5 +1,5 @@
|
|||||||
import { Marker } from "/vendor/maplibre-gl/maplibre-gl.mjs";
|
import { Marker } from "/vendor/maplibre-gl/maplibre-gl.mjs";
|
||||||
import { ROUTE_ICON } from "/js/icons.js";
|
import { ROUTE_ICON, POSITION_ICON, SAVED_POINT_ICON, REVERSE_ICON, CLEAR_ICON, SAVE_ICON } from "/js/icons.js";
|
||||||
import { notifySidePanelOpen, onlyOneSidePanelOpen, notifyGpxStoreChanged, onRoutePoint, onRouteEdit } from "/js/panels.js";
|
import { notifySidePanelOpen, onlyOneSidePanelOpen, notifyGpxStoreChanged, onRoutePoint, onRouteEdit } from "/js/panels.js";
|
||||||
import { isLoggedIn } from "/js/auth.js";
|
import { isLoggedIn } from "/js/auth.js";
|
||||||
import { wirePreview } from "/js/preview.js";
|
import { wirePreview } from "/js/preview.js";
|
||||||
@@ -76,6 +76,9 @@ export class RoutePanelControl {
|
|||||||
});
|
});
|
||||||
this._panel.querySelector('[data-action="clear"]').addEventListener("click", () => this._clear());
|
this._panel.querySelector('[data-action="clear"]').addEventListener("click", () => this._clear());
|
||||||
this._panel.querySelector('[data-action="position"]').addEventListener("click", () => this._addPosition());
|
this._panel.querySelector('[data-action="position"]').addEventListener("click", () => this._addPosition());
|
||||||
|
const icons = { position: POSITION_ICON, "saved-point": SAVED_POINT_ICON, reverse: REVERSE_ICON, clear: CLEAR_ICON, save: SAVE_ICON };
|
||||||
|
for (const [action, icon] of Object.entries(icons)) this._panel.querySelector(`[data-action="${action}"]`).insertAdjacentHTML("afterbegin", icon);
|
||||||
|
this._setupSavedPoints();
|
||||||
this._editingNote = this._panel.querySelector(".route-panel__editing");
|
this._editingNote = this._panel.querySelector(".route-panel__editing");
|
||||||
this._saveButton.addEventListener("click", () => this._save());
|
this._saveButton.addEventListener("click", () => this._save());
|
||||||
this._profileButton = this._panel.querySelector(".route-panel__profile");
|
this._profileButton = this._panel.querySelector(".route-panel__profile");
|
||||||
@@ -402,6 +405,50 @@ export class RoutePanelControl {
|
|||||||
return features.find((f) => f.geometry.type === "LineString")?.properties.id;
|
return features.find((f) => f.geometry.type === "LineString")?.properties.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// "Saved point": a search over the library's points (GET /api/search,
|
||||||
|
// the "layers" source, nearest the map center first); a pick adds it.
|
||||||
|
_setupSavedPoints() {
|
||||||
|
const box = this._panel.querySelector(".route-panel__saved");
|
||||||
|
const input = box.querySelector("input");
|
||||||
|
const list = box.querySelector("ul");
|
||||||
|
let timer = null;
|
||||||
|
let request = 0;
|
||||||
|
this._panel.querySelector('[data-action="saved-point"]').addEventListener("click", () => {
|
||||||
|
box.hidden = !box.hidden;
|
||||||
|
if (!box.hidden) input.focus();
|
||||||
|
});
|
||||||
|
input.addEventListener("input", () => {
|
||||||
|
clearTimeout(timer);
|
||||||
|
timer = setTimeout(async () => {
|
||||||
|
const mine = ++request;
|
||||||
|
const center = this._map.getCenter();
|
||||||
|
const url = new URL("/api/search", window.location.origin);
|
||||||
|
url.search = new URLSearchParams({ q: input.value, sources: "layers", lat: center.lat, lng: center.lng });
|
||||||
|
let results = [];
|
||||||
|
try {
|
||||||
|
if (input.value.trim()) results = (await (await fetch(url)).json()).results;
|
||||||
|
} catch {}
|
||||||
|
if (mine !== request) return;
|
||||||
|
const points = results.filter(({ bbox }) => bbox && bbox[0] === bbox[2] && bbox[1] === bbox[3]);
|
||||||
|
list.replaceChildren(
|
||||||
|
...points.map(({ name, bbox, source_label: folder }) => {
|
||||||
|
const item = document.createElement("li");
|
||||||
|
const button = Object.assign(document.createElement("button"), { type: "button", textContent: name, title: folder });
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
this._addPoint(bbox.slice(0, 2), name);
|
||||||
|
box.hidden = true;
|
||||||
|
input.value = "";
|
||||||
|
list.replaceChildren();
|
||||||
|
});
|
||||||
|
item.appendChild(button);
|
||||||
|
return item;
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
if (!points.length && input.value.trim()) list.replaceChildren(Object.assign(document.createElement("li"), { textContent: "No saved points found." }));
|
||||||
|
}, 250);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Where the route needs a vignette or pays tolls, country by country.
|
// Where the route needs a vignette or pays tolls, country by country.
|
||||||
_showCountries(countries) {
|
_showCountries(countries) {
|
||||||
const rows = (countries || []).flatMap(({ code, motorway_km: motorway, toll_km: toll }) => {
|
const rows = (countries || []).flatMap(({ code, motorway_km: motorway, toll_km: toll }) => {
|
||||||
|
|||||||
Vendored
+20
@@ -0,0 +1,20 @@
|
|||||||
|
Pictogrammers Free License
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
This icon collection is released as free, open source, and GPL friendly by
|
||||||
|
the [Pictogrammers](http://pictogrammers.com/) icon group. You may use it
|
||||||
|
for commercial projects, open source projects, or anything really.
|
||||||
|
|
||||||
|
# Icons: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
Some of the icons are redistributed under the Apache 2.0 license. All other
|
||||||
|
icons are either redistributed under their respective licenses or are
|
||||||
|
distributed under the Apache 2.0 license.
|
||||||
|
|
||||||
|
# Fonts: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
|
||||||
|
All web and desktop fonts are distributed under the Apache 2.0 license. Web
|
||||||
|
and desktop fonts contain some icons that are redistributed under the Apache
|
||||||
|
2.0 license. All other icons are either redistributed under their respective
|
||||||
|
licenses or are distributed under the Apache 2.0 license.
|
||||||
|
|
||||||
|
# Code: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
The MIT license applies to all non-font and non-icon files.
|
||||||
Vendored
+28
@@ -0,0 +1,28 @@
|
|||||||
|
// Generated by bin/vendor-sync.mjs from @mdi/js 7.4.47, Apache-2.0 (LICENSE).
|
||||||
|
export const mdiBacteriaOutline = "M9,2H7V4.1C6.29,4.25 5.73,4.54 5.32,4.91L2.7,2.29L1.29,3.71L4.24,6.65C4,7.39 4,8 4,8H2V10H4.04C4.1,10.63 4.21,11.36 4.4,12.15L1.68,13.05L2.31,14.95L5,14.05C5.24,14.56 5.5,15.08 5.82,15.58L3.44,17.17L4.55,18.83L7.07,17.15C7.63,17.71 8.29,18.21 9.06,18.64L8.1,20.55L9.89,21.45L10.89,19.45L10.73,19.36C11.68,19.68 12.76,19.9 14,19.97V22H16V19.93C16.76,19.84 17.81,19.64 18.77,19.19L20.29,20.71L21.7,19.29L20.37,17.95C20.75,17.44 21,16.8 21,16C21,15.5 20.95,15.08 20.88,14.68L22.45,13.9L21.55,12.1L20.18,12.79C19.63,11.96 18.91,11.5 18.29,11.28L18.95,9.32L17.05,8.68L16.29,10.96C14.96,10.83 14.17,10.32 13.7,9.77L15.45,8.9L14.55,7.1L13,7.89C12.97,7.59 12.86,6.72 12.28,5.87L13.83,3.55L12.17,2.44L10.76,4.56C10.28,4.33 9.7,4.15 9,4.06M15,18C12.06,18 9.81,17.18 8.31,15.56C5.68,12.72 6,8.2 6,8.17V8.11L6,8.03C6,7.1 6.39,6 8,6C10.63,6 10.97,7.43 11,8C11,10 12.6,13 17,13C17.33,13 19,13.15 19,16C19,17.89 15.03,18 15,18M8.5,8A1.5,1.5 0 0,0 7,9.5A1.5,1.5 0 0,0 8.5,11A1.5,1.5 0 0,0 10,9.5A1.5,1.5 0 0,0 8.5,8M11,12A1,1 0 0,0 10,13A1,1 0 0,0 11,14A1,1 0 0,0 12,13A1,1 0 0,0 11,12M15.5,14A1.5,1.5 0 0,0 14,15.5A1.5,1.5 0 0,0 15.5,17A1.5,1.5 0 0,0 17,15.5A1.5,1.5 0 0,0 15.5,14Z";
|
||||||
|
export const mdiBugOutline = "M20,8H17.19C16.74,7.2 16.12,6.5 15.37,6L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.05,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6C7.87,6.5 7.26,7.21 6.81,8H4V10H6.09C6.03,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.03,15.67 6.09,16H4V18H6.81C8.47,20.87 12.14,21.84 15,20.18C15.91,19.66 16.67,18.9 17.19,18H20V16H17.91C17.97,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.97,10.33 17.91,10H20V8M16,15A4,4 0 0,1 12,19A4,4 0 0,1 8,15V11A4,4 0 0,1 12,7A4,4 0 0,1 16,11V15M14,10V12H10V10H14M10,14H14V16H10V14Z";
|
||||||
|
export const mdiClockOutline = "M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z";
|
||||||
|
export const mdiCloudDownloadOutline = "M6.5 20Q4.22 20 2.61 18.43 1 16.85 1 14.58 1 12.63 2.17 11.1 3.35 9.57 5.25 9.15 5.68 7.35 7.38 5.73 9.07 4.1 11 4.1 11.83 4.1 12.41 4.69 13 5.28 13 6.1V12.15L14.6 10.6L16 12L12 16L8 12L9.4 10.6L11 12.15V6.1Q9.1 6.45 8.05 7.94 7 9.43 7 11H6.5Q5.05 11 4.03 12.03 3 13.05 3 14.5 3 15.95 4.03 17 5.05 18 6.5 18H18.5Q19.55 18 20.27 17.27 21 16.55 21 15.5 21 14.45 20.27 13.73 19.55 13 18.5 13H17V11Q17 9.8 16.45 8.76 15.9 7.73 15 7V4.68Q16.85 5.55 17.93 7.26 19 9 19 11 20.73 11.2 21.86 12.5 23 13.78 23 15.5 23 17.38 21.69 18.69 20.38 20 18.5 20M12 11.05Z";
|
||||||
|
export const mdiContentSaveOutline = "M17 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V7L17 3M19 19H5V5H16.17L19 7.83V19M12 12C10.34 12 9 13.34 9 15S10.34 18 12 18 15 16.66 15 15 13.66 12 12 12M6 6H15V10H6V6Z";
|
||||||
|
export const mdiCrosshairsGps = "M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M3.05,13H1V11H3.05C3.5,6.83 6.83,3.5 11,3.05V1H13V3.05C17.17,3.5 20.5,6.83 20.95,11H23V13H20.95C20.5,17.17 17.17,20.5 13,20.95V23H11V20.95C6.83,20.5 3.5,17.17 3.05,13M12,5A7,7 0 0,0 5,12A7,7 0 0,0 12,19A7,7 0 0,0 19,12A7,7 0 0,0 12,5Z";
|
||||||
|
export const mdiDeleteSweepOutline = "M15,16H19V18H15V16M15,8H22V10H15V8M15,12H21V14H15V12M11,10V18H5V10H11M13,8H3V18A2,2 0 0,0 5,20H11A2,2 0 0,0 13,18V8M14,5H11L10,4H6L5,5H2V7H14V5Z";
|
||||||
|
export const mdiFolderPlusOutline = "M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.89 4 4 4H10L12 6H20C21.1 6 22 6.89 22 8V13.81C21.39 13.46 20.72 13.22 20 13.09V8H4V18H13.09C13.04 18.33 13 18.66 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z";
|
||||||
|
export const mdiLayersOutline = "M12,18.54L19.37,12.8L21,14.07L12,21.07L3,14.07L4.62,12.81L12,18.54M12,16L3,9L12,2L21,9L12,16M12,4.53L6.26,9L12,13.47L17.74,9L12,4.53Z";
|
||||||
|
export const mdiLayersPlus = "M17,14H19V17H22V19H19V22H17V19H14V17H17V14M11,16L2,9L11,2L20,9L11,16M11,18.54L12,17.75V18C12,18.71 12.12,19.39 12.35,20L11,21.07L2,14.07L3.62,12.81L11,18.54Z";
|
||||||
|
export const mdiMagnify = "M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";
|
||||||
|
export const mdiMapMarkerOutline = "M12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5M12,2A7,7 0 0,1 19,9C19,14.25 12,22 12,22C12,22 5,14.25 5,9A7,7 0 0,1 12,2M12,4A5,5 0 0,0 7,9C7,10 7,12 12,18.71C17,12 17,10 17,9A5,5 0 0,0 12,4Z";
|
||||||
|
export const mdiMapMarkerPath = "M18,15A3,3 0 0,1 21,18A3,3 0 0,1 18,21C16.69,21 15.58,20.17 15.17,19H14V17H15.17C15.58,15.83 16.69,15 18,15M18,17A1,1 0 0,0 17,18A1,1 0 0,0 18,19A1,1 0 0,0 19,18A1,1 0 0,0 18,17M18,8A1.43,1.43 0 0,0 19.43,6.57C19.43,5.78 18.79,5.14 18,5.14C17.21,5.14 16.57,5.78 16.57,6.57A1.43,1.43 0 0,0 18,8M18,2.57A4,4 0 0,1 22,6.57C22,9.56 18,14 18,14C18,14 14,9.56 14,6.57A4,4 0 0,1 18,2.57M8.83,17H10V19H8.83C8.42,20.17 7.31,21 6,21A3,3 0 0,1 3,18C3,16.69 3.83,15.58 5,15.17V14H7V15.17C7.85,15.47 8.53,16.15 8.83,17M6,17A1,1 0 0,0 5,18A1,1 0 0,0 6,19A1,1 0 0,0 7,18A1,1 0 0,0 6,17M6,3A3,3 0 0,1 9,6C9,7.31 8.17,8.42 7,8.83V10H5V8.83C3.83,8.42 3,7.31 3,6A3,3 0 0,1 6,3M6,5A1,1 0 0,0 5,6A1,1 0 0,0 6,7A1,1 0 0,0 7,6A1,1 0 0,0 6,5M11,19V17H13V19H11M7,13H5V11H7V13Z";
|
||||||
|
export const mdiMapMarkerPlusOutline = "M15 17H18V14H20V17H23V19H20V22H18V19H15V17M9 6.5C10.4 6.5 11.5 7.6 11.5 9S10.4 11.5 9 11.5 6.5 10.4 6.5 9 7.6 6.5 9 6.5M9 2C12.9 2 16 5.1 16 9C16 14.2 9 22 9 22S2 14.2 2 9C2 5.1 5.1 2 9 2M9 4C6.2 4 4 6.2 4 9C4 10 4 12 9 18.7C14 12 14 10 14 9C14 6.2 11.8 4 9 4Z";
|
||||||
|
export const mdiMapMarkerRadiusOutline = "M12 4C14.2 4 16 5.8 16 8C16 10.1 13.9 13.5 12 15.9C10.1 13.4 8 10.1 8 8C8 5.8 9.8 4 12 4M12 2C8.7 2 6 4.7 6 8C6 12.5 12 19 12 19S18 12.4 18 8C18 4.7 15.3 2 12 2M12 6C10.9 6 10 6.9 10 8S10.9 10 12 10 14 9.1 14 8 13.1 6 12 6M20 19C20 21.2 16.4 23 12 23S4 21.2 4 19C4 17.7 5.2 16.6 7.1 15.8L7.7 16.7C6.7 17.2 6 17.8 6 18.5C6 19.9 8.7 21 12 21S18 19.9 18 18.5C18 17.8 17.3 17.2 16.2 16.7L16.8 15.8C18.8 16.6 20 17.7 20 19Z";
|
||||||
|
export const mdiMapMarkerStarOutline = "M12 2C15.9 2 19 5.1 19 9C19 14.2 12 22 12 22S5 14.2 5 9C5 5.1 8.1 2 12 2M12 4C9.2 4 7 6.2 7 9C7 10 7 12 12 18.7C17 12 17 10 17 9C17 6.2 14.8 4 12 4M12 11.5L14.4 13L13.8 10.2L16 8.3L13.1 8.1L12 5.4L10.9 8L8 8.3L10.2 10.2L9.5 13L12 11.5Z";
|
||||||
|
export const mdiPuzzleOutline = "M22,13.5C22,15.26 20.7,16.72 19,16.96V20A2,2 0 0,1 17,22H13.2V21.7A2.7,2.7 0 0,0 10.5,19C9,19 7.8,20.21 7.8,21.7V22H4A2,2 0 0,1 2,20V16.2H2.3C3.79,16.2 5,15 5,13.5C5,12 3.79,10.8 2.3,10.8H2V7A2,2 0 0,1 4,5H7.04C7.28,3.3 8.74,2 10.5,2C12.26,2 13.72,3.3 13.96,5H17A2,2 0 0,1 19,7V10.04C20.7,10.28 22,11.74 22,13.5M17,15H18.5A1.5,1.5 0 0,0 20,13.5A1.5,1.5 0 0,0 18.5,12H17V7H12V5.5A1.5,1.5 0 0,0 10.5,4A1.5,1.5 0 0,0 9,5.5V7H4V9.12C5.76,9.8 7,11.5 7,13.5C7,15.5 5.75,17.2 4,17.88V20H6.12C6.8,18.25 8.5,17 10.5,17C12.5,17 14.2,18.25 14.88,20H17V15Z";
|
||||||
|
export const mdiRadar = "M19.07,4.93L17.66,6.34C19.1,7.79 20,9.79 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12C4,7.92 7.05,4.56 11,4.07V6.09C8.16,6.57 6,9.03 6,12A6,6 0 0,0 12,18A6,6 0 0,0 18,12C18,10.34 17.33,8.84 16.24,7.76L14.83,9.17C15.55,9.9 16,10.9 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12C8,10.14 9.28,8.59 11,8.14V10.28C10.4,10.63 10,11.26 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12C14,11.26 13.6,10.62 13,10.28V2H12A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,9.24 20.88,6.74 19.07,4.93Z";
|
||||||
|
export const mdiRoutes = "M11,10H5L3,8L5,6H11V3L12,2L13,3V4H19L21,6L19,8H13V10H19L21,12L19,14H13V20A2,2 0 0,1 15,22H9A2,2 0 0,1 11,20V10Z";
|
||||||
|
export const mdiRuler = "M1.39,18.36L3.16,16.6L4.58,18L5.64,16.95L4.22,15.54L5.64,14.12L8.11,16.6L9.17,15.54L6.7,13.06L8.11,11.65L9.53,13.06L10.59,12L9.17,10.59L10.59,9.17L13.06,11.65L14.12,10.59L11.65,8.11L13.06,6.7L14.47,8.11L15.54,7.05L14.12,5.64L15.54,4.22L18,6.7L19.07,5.64L16.6,3.16L18.36,1.39L22.61,5.64L5.64,22.61L1.39,18.36Z";
|
||||||
|
export const mdiSunAngleOutline = "M13.8 5.2C13 5 12.2 5 11.4 5L14.6 2.3L16 6.3C15.3 5.8 14.6 5.5 13.8 5.2M7 7.1C7.6 6.5 8.3 6 9 5.7L4.9 4.9L5.6 9C6 8.3 6.4 7.6 7 7.1M5.2 13.8C5 13 5 12.2 5 11.4L2.3 14.6L6.3 16C5.8 15.4 5.4 14.6 5.2 13.8M22 19V21H3L8.4 15.5C6.5 13.5 6.5 10.4 8.4 8.4C10.3 6.5 13.5 6.5 15.4 8.4L18.4 5.4L19.8 6.8L7.7 19H22M9.8 14.1L14 9.8C12.8 8.7 11 8.7 9.8 9.8C8.7 11 8.7 12.9 9.8 14.1Z";
|
||||||
|
export const mdiSwapVertical = "M9,3L5,7H8V14H10V7H13M16,17V10H14V17H11L15,21L19,17H16Z";
|
||||||
|
export const mdiTrayArrowDown = "M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 15L17.55 9.54L16.13 8.13L13 11.25V2H11V11.25L7.88 8.13L6.46 9.55L12 15Z";
|
||||||
|
export const mdiTrayArrowUp = "M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z";
|
||||||
|
export const mdiWeatherSunsetDown = "M3,12H7A5,5 0 0,1 12,7A5,5 0 0,1 17,12H21A1,1 0 0,1 22,13A1,1 0 0,1 21,14H3A1,1 0 0,1 2,13A1,1 0 0,1 3,12M15,12A3,3 0 0,0 12,9A3,3 0 0,0 9,12H15M12,2L14.39,5.42C13.65,5.15 12.84,5 12,5C11.16,5 10.35,5.15 9.61,5.42L12,2M3.34,7L7.5,6.65C6.9,7.16 6.36,7.78 5.94,8.5C5.5,9.24 5.25,10 5.11,10.79L3.34,7M20.65,7L18.88,10.79C18.74,10 18.47,9.23 18.05,8.5C17.63,7.78 17.1,7.15 16.5,6.64L20.65,7M12.71,20.71L15.82,17.6C16.21,17.21 16.21,16.57 15.82,16.18C15.43,15.79 14.8,15.79 14.41,16.18L12,18.59L9.59,16.18C9.2,15.79 8.57,15.79 8.18,16.18C7.79,16.57 7.79,17.21 8.18,17.6L11.29,20.71C11.5,20.9 11.74,21 12,21C12.26,21 12.5,20.9 12.71,20.71Z";
|
||||||
|
export const mdiWeatherSunsetUp = "M3,12H7A5,5 0 0,1 12,7A5,5 0 0,1 17,12H21A1,1 0 0,1 22,13A1,1 0 0,1 21,14H3A1,1 0 0,1 2,13A1,1 0 0,1 3,12M15,12A3,3 0 0,0 12,9A3,3 0 0,0 9,12H15M12,2L14.39,5.42C13.65,5.15 12.84,5 12,5C11.16,5 10.35,5.15 9.61,5.42L12,2M3.34,7L7.5,6.65C6.9,7.16 6.36,7.78 5.94,8.5C5.5,9.24 5.25,10 5.11,10.79L3.34,7M20.65,7L18.88,10.79C18.74,10 18.47,9.23 18.05,8.5C17.63,7.78 17.1,7.15 16.5,6.64L20.65,7M12.71,16.3L15.82,19.41C16.21,19.8 16.21,20.43 15.82,20.82C15.43,21.21 14.8,21.21 14.41,20.82L12,18.41L9.59,20.82C9.2,21.21 8.57,21.21 8.18,20.82C7.79,20.43 7.79,19.8 8.18,19.41L11.29,16.3C11.5,16.1 11.74,16 12,16C12.26,16 12.5,16.1 12.71,16.3Z";
|
||||||
|
export const mdiWikipedia = "M14.97,18.95L12.41,12.92C11.39,14.91 10.27,17 9.31,18.95C9.3,18.96 8.84,18.95 8.84,18.95C7.37,15.5 5.85,12.1 4.37,8.68C4.03,7.84 2.83,6.5 2,6.5C2,6.4 2,6.18 2,6.05H7.06V6.5C6.46,6.5 5.44,6.9 5.7,7.55C6.42,9.09 8.94,15.06 9.63,16.58C10.1,15.64 11.43,13.16 12,12.11C11.55,11.23 10.13,7.93 9.71,7.11C9.39,6.57 8.58,6.5 7.96,6.5C7.96,6.35 7.97,6.25 7.96,6.06L12.42,6.07V6.47C11.81,6.5 11.24,6.71 11.5,7.29C12.1,8.53 12.45,9.42 13,10.57C13.17,10.23 14.07,8.38 14.5,7.41C14.76,6.76 14.37,6.5 13.29,6.5C13.3,6.38 13.3,6.17 13.3,6.07C14.69,6.06 16.78,6.06 17.15,6.05V6.47C16.44,6.5 15.71,6.88 15.33,7.46L13.5,11.3C13.68,11.81 15.46,15.76 15.65,16.2L19.5,7.37C19.2,6.65 18.34,6.5 18,6.5C18,6.37 18,6.2 18,6.05L22,6.08V6.1L22,6.5C21.12,6.5 20.57,7 20.25,7.75C19.45,9.54 17,15.24 15.4,18.95C15.4,18.95 14.97,18.95 14.97,18.95Z";
|
||||||
+9
-1
@@ -114,8 +114,16 @@
|
|||||||
<p class="route-panel__hint">Click the map to add points (or "Add to route" on a search result or a library point); drag a marker to move it.</p>
|
<p class="route-panel__hint">Click the map to add points (or "Add to route" on a search result or a library point); drag a marker to move it.</p>
|
||||||
<p class="route-panel__editing" hidden></p>
|
<p class="route-panel__editing" hidden></p>
|
||||||
<ol class="route-panel__points"></ol>
|
<ol class="route-panel__points"></ol>
|
||||||
|
<!-- Icons are added by RoutePanelControl (public/js/icons.js). -->
|
||||||
|
<div class="route-panel__buttons">
|
||||||
|
<button type="button" data-action="position">My position</button>
|
||||||
|
<button type="button" data-action="saved-point">Saved point</button>
|
||||||
|
</div>
|
||||||
|
<div class="route-panel__saved" hidden>
|
||||||
|
<input type="search" placeholder="Search saved points" aria-label="Search saved points">
|
||||||
|
<ul></ul>
|
||||||
|
</div>
|
||||||
<div class="route-panel__buttons">
|
<div class="route-panel__buttons">
|
||||||
<button type="button" data-action="position">+ My position</button>
|
|
||||||
<button type="button" data-action="reverse">Reverse</button>
|
<button type="button" data-action="reverse">Reverse</button>
|
||||||
<button type="button" data-action="clear">Clear</button>
|
<button type="button" data-action="clear">Clear</button>
|
||||||
<button type="button" data-action="save" hidden>Save to library</button>
|
<button type="button" data-action="save" hidden>Save to library</button>
|
||||||
|
|||||||
Reference in new issue
Block a user