# Dealer geocodes and map sources This folder is bundled in the mockup zip so the dealer map and ZIP/city distances work offline (no API keys, no tile requests). Coordinates are never invented. Retrieved 2026-11-27. ## Dealer pins All 14 published dealer addresses from `data.py` (carnai.com directory) were geocoded with **OpenStreetMap Nominatim**: - Endpoint: `https://nominatim.openstreetmap.org/search` (`format=jsonv2`, `countrycodes=us`) - User-Agent: `CarnaiMockupGeocoder/1.0 (Carnai mockup; local static site)` - One request at a time, 1.1 s between calls - Results stored in `dealer-geocodes.json` (query used, match type, `display_name`, `osm_id`, lat/lon, licence, timestamp) Licence: data © OpenStreetMap contributors, [ODbL](https://www.openstreetmap.org/copyright). If the full published address (including a unit or suite) did not return a hit, the unit/suite was dropped and the query was retried. The JSON records `query_used` and `match` (`exact` or `fallback-query`). No coordinates were typed by hand. ### Matches that need a caveat - **Clark’s Marine & Powersports**, 192 Degrief Road, Colville, WA 99114. OSM has Degrief Road in Colville but not house number 192. Further queries (including structured street/city/postal) returned the same road centroid. The pin is that Nominatim street-level result, not an invented lot coordinate (`precision`: `street-centroid`). - **Young Truck and Trailer Center LLC**, published `2900 S. HWY 89-91, Nibley, UT 84321`. That string was not found. Fallback query `2900 S US-89, Nibley, UT 84321` returned OSM `2900 South, Nibley, Cache County, Utah, 84326` (residential, place_rank 26). OSM postal 84326 vs published 84321. The pin is that Nominatim result, not invented. - **AllSport**, **Knottical Marine**, and **Wind Toys** used a fallback query that dropped a unit or suite. Nominatim then matched the building or street. - **Elephant Boy’s** and **Spokane Powersports** matched the named business at the published street number, but Nominatim’s ZIP differs from the published directory ZIP (99016 vs 99216, and 99217 vs 99208). Pins use the Nominatim result. The on-page directory still shows the published addresses unchanged. ## ZIP and city distances Straight-line (haversine) miles are shown only when the search can be resolved to a point from **bundled GeoNames US postal centroids** for WA, ID, OR, CA, and UT (`zips-west.json`). - Source: [GeoNames US.zip](https://download.geonames.org/export/zip/US.zip), retrieved 2026-11-27 - Licence: [Creative Commons Attribution 4.0](https://creativecommons.org/licenses/by/4.0/). Credit: [www.geonames.org](https://www.geonames.org). A 5-digit ZIP (or ZIP+4, using the first five digits) looks up that centroid. A city name, optionally with a state (`Spokane`, `Spokane, WA`), uses the average of GeoNames centroids for that place. Distances are measured to the geocoded dealer pins, not to guessed coordinates. If the query is not a known ZIP or city (a dealer name, a typo, or the ZIP file cannot be loaded), the directory falls back to a text filter, the map fits the matching pins, and **no distances are shown**. There is no “select a country” error. ## Map outlines Simplified western US state outlines in `states-west.json` (WA, OR, CA, ID, UT, plus NV, AZ, MT, WY for context). - Source: [PublicaMundi MappingAPI `us-states.json`](https://github.com/PublicaMundi/MappingAPI/blob/master/data/geojson/us-states.json), retrieved 2026-11-27 - These outlines are commonly derived from public US Census cartographic data. The default view fits the 14 dealer pins with padding. Filtering or a resolved search fits the visible pins (and the origin, if any). The map never uses a world-scale default, and a zero-result search does not zoom to the world. The map is a static SVG (no raster tiles, no Mapbox/Google key). It works from the zip when the mockup is served as static files. If `zips-west.json` cannot be fetched (for example `file://`), pins and state outlines still render from bundled `data.js`; only ZIP/city distances degrade.