Swap the pin marker for a rounded-square badge
The National Park Service frames its own map symbols (the icons already vendored in for POI categories) in a rounded square, not a pin — pairing a pin shape with NPS-style pictograms looked like two mismatched icon conventions. Switched the marker to a rounded square to match. This also simplifies the placement code: a pin has to anchor at its tip, so the category glyph on top needed an offset computed from the pin/glyph geometry to land in the pin's head. A square has no tip — both the badge and the glyph layer just center directly on the coordinate with no offset math at all.
This commit is contained in:
1 parent
2a83bb10ca
commit
7de8428b05
3 files changed
+50
-64
No files matched your search
+11
-8
@@ -58,14 +58,17 @@ export const ROUTE_ICON = `
|
||||
<path d="M6.5 7.5C10 11 8 13 12 13s2 5 6.5 5" stroke-dasharray="2 2.2"/>
|
||||
</svg>`;
|
||||
|
||||
// Filled version of WAYPOINT_ICON's outline (same path, fill instead of
|
||||
// stroke) — used as the map marker for individual waypoints, tinted by
|
||||
// category color via icon-color (see gpx.js). A pin/teardrop shape rather
|
||||
// than a plain dot specifically so it doesn't blend in with a base map
|
||||
// style's own small circular POI icons; the tip (not the head center) is
|
||||
// the anchor point, the standard map-pin convention.
|
||||
export const MAP_PIN_ICON = `
|
||||
<svg viewBox="0 0 24 24"><path d="M12 21s7-7.58 7-12a7 7 0 0 0-14 0c0 4.42 7 12 7 12z" fill="currentColor"/></svg>`;
|
||||
// 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 = `
|
||||
<svg viewBox="0 0 24 24"><rect x="1" y="1" width="22" height="22" rx="5" fill="currentColor"/></svg>`;
|
||||
|
||||
// POI category glyphs (park4night/OsmAnd exports), keyed by the OsmAnd icon
|
||||
// name a file's <osmand:icon> extension carries — a small curated set for
|
||||
|
||||
Reference in new issue
Block a user