Skip to content

Traffic signs: picker, map overlay, and multi-country catalog#13

Draft
tordans wants to merge 2 commits into
masterfrom
cursor/traffic-signs-b8de
Draft

Traffic signs: picker, map overlay, and multi-country catalog#13
tordans wants to merge 2 commits into
masterfrom
cursor/traffic-signs-b8de

Conversation

@tordans

@tordans tordans commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

Adds traffic sign support to Go Map!! using the published @osm-traffic-signs/converter package (v0.5.1).

  • Build pipeline (src/traffic-signs/): npm script generates TrafficSignIndex.json and TrafficSigns.xcassets from the converter; wired into src/update_all.sh.
  • POI picker: + button on traffic_sign, traffic_sign:forward, and traffic_sign:backward when the current map region has a bundled catalog.
  • Map overlay: optional “Show Traffic Signs” toggle in Display settings; bead-chain icons on nodes and ways.
  • Offline compose/decompose: Swift port for editing compound tag values without network access.

Catalog scope (v0.5.1)

Bundled catalogs for 8 countries: DE, BE, AT, CA, PL, FR, AU, BR (~1990 SVG imagesets).

Country selection follows the existing map region (currentRegion.country). The picker and overlay are hidden when no catalog exists for the active country.

Each catalog includes synthetic named-value entries (city_limit, maxspeed, stop, give_way, etc.) for values without dedicated SVGs; these show a signpost SF Symbol in the picker and a text placeholder on the map.

Testing

  • Run src/traffic-signs/update.sh (or src/update_all.sh) after bumping the converter version.
  • Germany: edit a node traffic_sign=DE:310;city_limit — picker shows chips, map overlay shows icons.
  • Switch region to another supported country (e.g. AT, FR, AU) — + appears and catalog search returns local signs.
  • Unsupported country — no + button, overlay hidden.
  • Way with only traffic_sign:forward + generic traffic_sign — generic fills backward direction without duplicating forward.

Notes

  • Large asset commit (~2000 imagesets). Rebuild replaces TrafficSigns.xcassets when the converter adds countries or signs.
  • Build script imports converter data modules by filesystem path to avoid Node failing on dynamic .svg imports from the package main entry.
Open in Web Open in Cursor 

Introduce a prep script using @osm-traffic-signs/converter that emits
TrafficSignIndex.json and TrafficSigns.xcassets for Germany. The POI editor
shows a + control on traffic_sign tags when the map country has a catalog,
opening a searchable grid picker with chip selection and compose/decompose
preserving unrecognized fragments. Display settings gain a Show Traffic Signs
toggle that draws sign chains on nodes and ways with directional tag handling.

Co-authored-by: Tobias <t@tobiasjordans.de>
@tordans tordans closed this Jun 6, 2026
@tordans tordans reopened this Jun 6, 2026
Bump @osm-traffic-signs/converter to 0.5.1 and rebuild the bundled index
and asset catalog for DE, BE, AT, CA, PL, FR, AU, and BR (~1990 SVGs).

Fix the Node build script to import converter data modules directly, avoiding
the package main entry that loads SVG loaders Node cannot resolve.

Add named-value entries (city_limit, maxspeed, stop, etc.) to each country
catalog, overlay refresh on map data changes, and improved way directional
rendering. Picker shows a signpost fallback icon for named values.

Co-authored-by: Tobias <t@tobiasjordans.de>
@cursor cursor Bot changed the title Traffic signs: build script, POI picker, map overlay Traffic signs: picker, map overlay, and multi-country catalog Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants