RoadAheadLoading…
Loading map…

Setup & import

Import CHP XML (testing / no relay)

Paste or choose a saved copy of sa.xml. Shown as “Imported snapshot — not live”.

Google Maps key

Edit CONFIG.MAPS_API_KEY at the top of the script. In Google Cloud Console: create a project, enable billing, enable Maps JavaScript API, create an API key. Then restrict it: Application restrictions → Websites (HTTP referrers) listing your site (e.g. https://you.example.com/*, and http://localhost:8000/* for testing), and API restrictions → Maps JavaScript API only. Referrer restrictions can’t match a file:// page, so test via localhost.

Feed relay (automatic updates)

Browsers only let a page read another site’s XML if that site sends CORS headers. If the console shows a CORS error, the CHP feed can’t be read directly from your page (no-cors would only return an unreadable response). The smallest fix: a tiny server/worker you control that fetches sa.xml and returns it with Access-Control-Allow-Origin: https://your-site. Put its URL in CONFIG.RELAY_URL. Until then, use Import.