# city-roads

- Author: Andrei Kashcha (anvaka)
- Source: https://github.com/anvaka/city-roads
- Commit: 35d6497db70debf4508b4d75f17d80c4367d66a6 (main, 2026-10-10)
- Built from source with the Web Curio edits below: `npm ci && npx vite build` (vite 2, package-lock.json of that commit); dist/ copied here (stats.html from rollup-plugin-visualizer omitted)
- Licence: MIT (./LICENSE). Bundled npm code (vue, w-gl, d3-geo, d3-array, d3-require, pbf, ieee754, query-state, tinycolor2, ngraph.events) and the vendored vue3-color component: ./LICENSE-third-party.txt
- Font: Roboto 400 latin (fonts/roboto-latin-400-normal.woff2) from @fontsource/roboto 5.1.0, Apache-2.0 (fonts/ROBOTO-LICENSE), replacing the Google Fonts link
- Vendored files: index.html, assets/ (build output), LICENSE

## Data snapshot (replaces Nominatim + Overpass/cache requests)
- data/roads/*.pbf: road extracts for Paris, Venezia, San Francisco and Barcelona, copied unchanged from the author's own cache
  (https://d2uf7yjjctyxf.cloudfront.net/nov-02-2020/, i.e. OpenStreetMap data as of about 2020-11-02), fetched 2026-10-29.
- Licence: © OpenStreetMap contributors, Open Database License (ODbL) 1.0 — see data/roads/NOTICE.txt. The attribution is shown on the
  start screen and in the corner of every rendered city ("data © OpenStreetMap contributors, ODbL (snapshot 2020-11)").
- City search list: src/lib/bundledPlaces.js (added), with the Nominatim relation ids and bounding boxes looked up once at build time.

## Added by Web Curio
stage.html, this file, LICENSE-third-party.txt, fonts/, data/roads/ (+ NOTICE.txt), src/lib/bundledPlaces.js (compiled in).

## Modifications to the original (source edits before building)
- src/config.js: `areaServer` points to `data/roads` (the bundled files) instead of the CloudFront cache.
- src/lib/findBoundaryByName.js: searches the four bundled cities instead of nominatim.openstreetmap.org (an empty or unmatched query lists all four).
- src/components/FindPlace.vue: placeholder lists the bundled cities; a two-line note about the offline copy and the ODbL attribution added to the start screen;
  Enter in the search box calls the search directly (the museum's sandboxed iframe blocks form submission, which the original relied on).
- src/App.vue: "Onto a mug" export hidden (it uploads the picture to a third-party server to make a Zazzle link); attribution text
  changed from "© OpenStreetMap" to "© OpenStreetMap contributors, ODbL (snapshot 2020-11)" linking to osm.org/copyright.
- src/NoWebGL.vue: removed the demo image hot-linked from imgur.
- index.html: Google Analytics (gtag) removed, Google Fonts link replaced by the bundled Roboto, og:image (imgur) removed.
  The compiled bundle still contains the original guarded `typeof gtag` calls; with no gtag defined they do nothing.
- stage.html: strict CSP + sandbox shim (stage.py, no other edits).
- Not working offline: any city other than the four bundled ones (the Overpass fallback is blocked by the CSP);
  PNG/SVG export depends on the host allowing downloads from the sandboxed frame.
