diff --git a/docs/third-party-notices.adoc b/docs/third-party-notices.adoc index baa35af..d6d589e 100644 --- a/docs/third-party-notices.adoc +++ b/docs/third-party-notices.adoc @@ -55,6 +55,20 @@ overview's polar pan limit, but MapLibre 6's `Map` no longer exposes `.transform` at all — guarded to skip that (cosmetic) adjustment instead of throwing when it's absent. +Also vendored under `public/vendor/` — MIT-licensed (© 2013 Panayiotis +Lipiridis), attribution required (this notice satisfies that): + +[cols="1,1,2"] +|=== +| Library | Version | Source + +| flag-icons (just the square `1x1/` crop, only the 39 European +countries `lib/maptool/data/europe_countries.geojson` lists — see +`public/js/offline_data.js`) +| 7.5.0 +| https://github.com/lipis/flag-icons +|=== + Offline map text labels need font glyphs too (see `docs/architecture.adoc`), vendored under `public/vendor/fonts/` — SIL Open Font License, not BSD-3-Clause like the above: diff --git a/public/css/style.css b/public/css/style.css index f4f6ba4..4976cc1 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -428,6 +428,18 @@ html, body { background: #f0f0f0; } +/* Same rounded-square badge ratio as icons.js's own MAP_MARKER_ICON + (rx 5 of a 22-wide square) — a consistent frame rather than however + each flag's own artwork happens to fill an unbordered square. */ +.offline-data-panel__flag { + flex-shrink: 0; + width: 18px; + height: 18px; + border-radius: 4px; + border: 1px solid rgba(0, 0, 0, 0.15); + object-fit: cover; +} + .offline-data-panel__region-status { padding: 6px 8px; color: #888; diff --git a/public/js/offline_data.js b/public/js/offline_data.js index 9b17cc8..91c5e6d 100644 --- a/public/js/offline_data.js +++ b/public/js/offline_data.js @@ -25,13 +25,16 @@ function formatRunning(status) { return `Building…${elapsed}`; } -// Two Unicode regional indicator symbols, offset from the country's own -// ISO A2 letters — the standard zero-asset way to get a flag glyph (most -// platforms render the pair as one flag; a code with no assigned flag, -// e.g. Kosovo's "XK", just falls back to showing the two letters, not -// broken, just plainer). -function flagEmoji(code) { - return [...code.toUpperCase()].map((c) => String.fromCodePoint(127397 + c.charCodeAt(0))).join(""); +// Vendored square-cropped SVGs (public/vendor/flag-icons/, MIT, see +// docs/third-party-notices.adoc) rather than Unicode flag emoji — emoji +// are font glyphs, not shapes, so they can't be resized/bordered/muted to +// fit this app's own controlled, hand-drawn-icon look the way a real SVG +// can (same reasoning the topbar readout's icons already settled on +// earlier — see icons.js). Framed in a small rounded-square badge in the +// markup below, the same convention icons.js's MAP_MARKER_ICON already +// uses for framing a category glyph, rather than a new visual language. +function flagIconUrl(code) { + return `/vendor/flag-icons/1x1/${code.toLowerCase()}.svg`; } // meta.source is a Protomaps build filename like "20260910.pmtiles" — the @@ -90,7 +93,8 @@ class RegionPicker {
  • `, ) diff --git a/public/vendor/flag-icons/1x1/al.svg b/public/vendor/flag-icons/1x1/al.svg new file mode 100644 index 0000000..1056793 --- /dev/null +++ b/public/vendor/flag-icons/1x1/al.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/at.svg b/public/vendor/flag-icons/1x1/at.svg new file mode 100644 index 0000000..758ced6 --- /dev/null +++ b/public/vendor/flag-icons/1x1/at.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/vendor/flag-icons/1x1/ba.svg b/public/vendor/flag-icons/1x1/ba.svg new file mode 100644 index 0000000..456ca12 --- /dev/null +++ b/public/vendor/flag-icons/1x1/ba.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/be.svg b/public/vendor/flag-icons/1x1/be.svg new file mode 100644 index 0000000..31d6210 --- /dev/null +++ b/public/vendor/flag-icons/1x1/be.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/bg.svg b/public/vendor/flag-icons/1x1/bg.svg new file mode 100644 index 0000000..78412c5 --- /dev/null +++ b/public/vendor/flag-icons/1x1/bg.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/by.svg b/public/vendor/flag-icons/1x1/by.svg new file mode 100644 index 0000000..7d2ef67 --- /dev/null +++ b/public/vendor/flag-icons/1x1/by.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/ch.svg b/public/vendor/flag-icons/1x1/ch.svg new file mode 100644 index 0000000..52578bf --- /dev/null +++ b/public/vendor/flag-icons/1x1/ch.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/cz.svg b/public/vendor/flag-icons/1x1/cz.svg new file mode 100644 index 0000000..dcd0a6b --- /dev/null +++ b/public/vendor/flag-icons/1x1/cz.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/de.svg b/public/vendor/flag-icons/1x1/de.svg new file mode 100644 index 0000000..05a0a69 --- /dev/null +++ b/public/vendor/flag-icons/1x1/de.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/dk.svg b/public/vendor/flag-icons/1x1/dk.svg new file mode 100644 index 0000000..5aaaa19 --- /dev/null +++ b/public/vendor/flag-icons/1x1/dk.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/ee.svg b/public/vendor/flag-icons/1x1/ee.svg new file mode 100644 index 0000000..5a6a7e3 --- /dev/null +++ b/public/vendor/flag-icons/1x1/ee.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/es.svg b/public/vendor/flag-icons/1x1/es.svg new file mode 100644 index 0000000..6bfa092 --- /dev/null +++ b/public/vendor/flag-icons/1x1/es.svg @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/fi.svg b/public/vendor/flag-icons/1x1/fi.svg new file mode 100644 index 0000000..aba2ef3 --- /dev/null +++ b/public/vendor/flag-icons/1x1/fi.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/fr.svg b/public/vendor/flag-icons/1x1/fr.svg new file mode 100644 index 0000000..0f60170 --- /dev/null +++ b/public/vendor/flag-icons/1x1/fr.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/gb.svg b/public/vendor/flag-icons/1x1/gb.svg new file mode 100644 index 0000000..ce4d1e0 --- /dev/null +++ b/public/vendor/flag-icons/1x1/gb.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/gr.svg b/public/vendor/flag-icons/1x1/gr.svg new file mode 100644 index 0000000..a268830 --- /dev/null +++ b/public/vendor/flag-icons/1x1/gr.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/hr.svg b/public/vendor/flag-icons/1x1/hr.svg new file mode 100644 index 0000000..d8719a4 --- /dev/null +++ b/public/vendor/flag-icons/1x1/hr.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/hu.svg b/public/vendor/flag-icons/1x1/hu.svg new file mode 100644 index 0000000..088242d --- /dev/null +++ b/public/vendor/flag-icons/1x1/hu.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/ie.svg b/public/vendor/flag-icons/1x1/ie.svg new file mode 100644 index 0000000..e13de22 --- /dev/null +++ b/public/vendor/flag-icons/1x1/ie.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/is.svg b/public/vendor/flag-icons/1x1/is.svg new file mode 100644 index 0000000..26510b9 --- /dev/null +++ b/public/vendor/flag-icons/1x1/is.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/it.svg b/public/vendor/flag-icons/1x1/it.svg new file mode 100644 index 0000000..b9596d0 --- /dev/null +++ b/public/vendor/flag-icons/1x1/it.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/lt.svg b/public/vendor/flag-icons/1x1/lt.svg new file mode 100644 index 0000000..52ada94 --- /dev/null +++ b/public/vendor/flag-icons/1x1/lt.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/lu.svg b/public/vendor/flag-icons/1x1/lu.svg new file mode 100644 index 0000000..037c315 --- /dev/null +++ b/public/vendor/flag-icons/1x1/lu.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/lv.svg b/public/vendor/flag-icons/1x1/lv.svg new file mode 100644 index 0000000..5af883c --- /dev/null +++ b/public/vendor/flag-icons/1x1/lv.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/vendor/flag-icons/1x1/md.svg b/public/vendor/flag-icons/1x1/md.svg new file mode 100644 index 0000000..f204511 --- /dev/null +++ b/public/vendor/flag-icons/1x1/md.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/me.svg b/public/vendor/flag-icons/1x1/me.svg new file mode 100644 index 0000000..25c6b28 --- /dev/null +++ b/public/vendor/flag-icons/1x1/me.svg @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/mk.svg b/public/vendor/flag-icons/1x1/mk.svg new file mode 100644 index 0000000..0ee923a --- /dev/null +++ b/public/vendor/flag-icons/1x1/mk.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/nl.svg b/public/vendor/flag-icons/1x1/nl.svg new file mode 100644 index 0000000..49ca5bc --- /dev/null +++ b/public/vendor/flag-icons/1x1/nl.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/no.svg b/public/vendor/flag-icons/1x1/no.svg new file mode 100644 index 0000000..939920d --- /dev/null +++ b/public/vendor/flag-icons/1x1/no.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/pl.svg b/public/vendor/flag-icons/1x1/pl.svg new file mode 100644 index 0000000..8c43577 --- /dev/null +++ b/public/vendor/flag-icons/1x1/pl.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/vendor/flag-icons/1x1/pt.svg b/public/vendor/flag-icons/1x1/pt.svg new file mode 100644 index 0000000..6c8334b --- /dev/null +++ b/public/vendor/flag-icons/1x1/pt.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/ro.svg b/public/vendor/flag-icons/1x1/ro.svg new file mode 100644 index 0000000..e6cf0f6 --- /dev/null +++ b/public/vendor/flag-icons/1x1/ro.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/vendor/flag-icons/1x1/rs.svg b/public/vendor/flag-icons/1x1/rs.svg new file mode 100644 index 0000000..3610fd1 --- /dev/null +++ b/public/vendor/flag-icons/1x1/rs.svg @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/ru.svg b/public/vendor/flag-icons/1x1/ru.svg new file mode 100644 index 0000000..f428b0c --- /dev/null +++ b/public/vendor/flag-icons/1x1/ru.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/vendor/flag-icons/1x1/se.svg b/public/vendor/flag-icons/1x1/se.svg new file mode 100644 index 0000000..8f3f134 --- /dev/null +++ b/public/vendor/flag-icons/1x1/se.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/vendor/flag-icons/1x1/si.svg b/public/vendor/flag-icons/1x1/si.svg new file mode 100644 index 0000000..ba67e19 --- /dev/null +++ b/public/vendor/flag-icons/1x1/si.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/sk.svg b/public/vendor/flag-icons/1x1/sk.svg new file mode 100644 index 0000000..4846127 --- /dev/null +++ b/public/vendor/flag-icons/1x1/sk.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/vendor/flag-icons/1x1/ua.svg b/public/vendor/flag-icons/1x1/ua.svg new file mode 100644 index 0000000..7ceb894 --- /dev/null +++ b/public/vendor/flag-icons/1x1/ua.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/vendor/flag-icons/1x1/xk.svg b/public/vendor/flag-icons/1x1/xk.svg new file mode 100644 index 0000000..b5403e3 --- /dev/null +++ b/public/vendor/flag-icons/1x1/xk.svg @@ -0,0 +1,5 @@ + + + + +