Skip to content

feat: add country-aware OpenStreetMap ZIP lookup#817

Open
anonymoususer72041 wants to merge 3 commits into
opencats:masterfrom
anonymoususer72041:feature/openstreetmap-zip-lookup
Open

feat: add country-aware OpenStreetMap ZIP lookup#817
anonymoususer72041 wants to merge 3 commits into
opencats:masterfrom
anonymoususer72041:feature/openstreetmap-zip-lookup

Conversation

@anonymoususer72041

Copy link
Copy Markdown
Contributor

Summary

Replaces the ZIP code lookup implementation with OpenStreetMap Nominatim instead of the previous Google Maps Geocoding XML endpoint.

The lookup now uses Nominatim’s JSON API, sends an identifying User-Agent, scopes postal-code searches by the selected country when available and maps returned address fields back into the existing street, city and state response structure used by the current AJAX ZIP lookup flow.

The frontend now includes the selected country in ZIP lookup requests and only updates address fields when the lookup actually returns values, preserving user-entered data when Nominatim does not return a matching street, city, or state.

Motivation

The existing ZIP lookup depended on the legacy Google Maps Geocoding endpoint. Google now requires API keys for Maps Platform geocoding requests, which makes the old unauthenticated lookup path unsuitable for the current OpenCATS setup.

Moving this lookup to OpenStreetMap Nominatim removes that dependency while keeping the existing OpenCATS ZIP lookup flow intact.

Postal codes are not globally unique, so passing the selected country helps avoid incorrect matches from other countries. Preserving existing field values when no lookup result is returned also prevents the ZIP lookup from accidentally clearing information the user already entered manually.

This keeps the change focused on the existing ZIP lookup path while improving provider independence, lookup accuracy and user experience.

@anonymoususer72041 anonymoususer72041 added this to the 0.11.0 milestone Jul 3, 2026
@anonymoususer72041 anonymoususer72041 requested a review from RussH July 3, 2026 13:14
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.

1 participant