Hacker News new | ask | show | jobs
by gus_massa 1 day ago
Can you share any details of the tech stack? What maps are you using? Openstreetmap?
1 comments

Yep! OpenStreetMap all the way down. Leaflet for the map with OSM raster tiles, and Nominatim for geocoding the typed address (US-restricted). County boundaries are US Census data as TopoJSON (~0.8 MB), self-hosted and decoded client-side with topojson-client. Once that loads, clicking the map resolves to a county with a local ray-casting point-in-polygon check - no API call. County lines and labels only render for what's in the viewport past a zoom threshold. React + Vite around it. No backend, no keys, no paid APIs.

For easy reading:

- Frontend: React 18 + Vite, React Router

- Map: Leaflet, lazy-loaded when the tool page mounts

- Base tiles: OpenStreetMap raster tiles (free, no key)

- Geocoding: Nominatim (US-restricted), only for typed address searches

- County boundaries: US Census TopoJSON (~0.8 MB), self-hosted, decoded client-side with topojson-client

- Click-to-county: local ray-casting point-in-polygon - no API call

- County lines/labels only render for the visible viewport past a zoom threshold