All 307 NPS symbols (symbol-library 2024 revision, CC0) vendored by bin/nps-symbols-sync.mjs and browsable at /symbols.html; POI_ICONS maps every symbol by name plus the OsmAnd names, the note icon picker gets a filter, and only the glyphs a shown file uses get rasterized
This commit is contained in:
1 parent
6faabca93d
commit
085c14beca
10 files changed
+551
-279
No files matched your search
+8
-11
@@ -477,20 +477,17 @@ reaches a layer, rather than a `coalesce` in a style expression — see
|
||||
below for why. Unlike a pin, which has to anchor at its tip, the badge
|
||||
is centered directly on the coordinate with plain default anchoring,
|
||||
which also means the category-glyph layer on top needs no offset math:
|
||||
both layers just share the same center anchor at `[0, 0]`. A small
|
||||
curated icon set (`public/js/icons.js`'s `POI_ICONS`, covering the
|
||||
categories p4n2gpx actually uses, not an exhaustive OsmAnd icon set)
|
||||
both layers just share the same center anchor at `[0, 0]`. The icon set
|
||||
(`public/js/icons.js`'s `POI_ICONS`: every NPS symbol by its own name,
|
||||
plus the OsmAnd names p4n2gpx/Overpass POIs use mapped onto them)
|
||||
draws a white glyph on top of the badge for any waypoint whose `icon`
|
||||
matches a known key (filtered out entirely for anything else, so an
|
||||
unrecognized icon key just falls back to a plain colored badge rather
|
||||
than a broken/missing image warning). All seven glyphs are the National
|
||||
Park Service's own map symbols — pulled from
|
||||
`github.com/nationalparkservice/npmap5-plugins`'s bundled
|
||||
`symbol-library` (CC0-licensed, an actively-maintained monorepo that's
|
||||
the designated replacement for the same org's older standalone
|
||||
`symbol-library` repo, per its maintainer) — a professional,
|
||||
purpose-built icon set beats hand-drawing "fuel pump"/"picnic table"
|
||||
glyphs from scratch.
|
||||
than a broken/missing image warning). The glyphs are the National
|
||||
Park Service's own map symbols, all of them, vendored by
|
||||
`bin/nps-symbols-sync.mjs` (CC0, see `docs/nps-resources.adoc`) and
|
||||
browsable at `/symbols.html`. Only the ones a shown file uses get
|
||||
rasterized.
|
||||
+
|
||||
Both the badge and the glyphs are rasterized from their source SVGs
|
||||
(an `<img>` → `<canvas>` → `ImageData` round trip, since `map.addImage`
|
||||
|
||||
Reference in new issue
Block a user