Implementation of Reverse Geocoding (Address from Coordinates) in a Mobile Application
Reverse geocoding is translating a pair (latitude, longitude) into a readable postal address. The task looks trivial until the app starts working outside the city with good map coverage, or when coordinates arrive with delay and UI is already waiting for a string.
Where "Obvious" Solutions Break Most Often
On iOS, the standard way is CLGeocoder.reverseGeocodeLocation(_:completionHandler:). The problem: one request per second, hard rate limit from Apple. If you need to show address for 20 map points simultaneously — CLGeocoder turns into a queue with 15-20 second delays, because each call blocks the next until response arrives.
On Android, Geocoder.getFromLocation() before API 33 executes synchronously and throws IOException on no network without fallback. From API 33, GeocodeListener appeared, but devices on Android 12 and lower don't support it — you need to maintain two code paths.
In both cases, results depend on provider database quality. Apple uses TomTom and HERE, Google — its own database. Outside major cities, addresses return as "Unnamed Road" or just administrative district level.
How We Implement
For most projects, we use Google Maps Geocoding API instead of platform solutions — uniform results on iOS and Android, more accurate addresses in CIS and Eastern Europe, predictable response format.
On iOS SDK: GMSGeocoder.reverseGeocodeCoordinate(_:completionHandler:) from GoogleMaps package. Returns GMSReverseGeocodeResponse with GMSAddress array — take first, parse thoroughfare, subThoroughfare, locality, administrativeArea, postalCode.
On Android: Retrofit client to maps.googleapis.com/maps/api/geocode/json?latlng=…&language=en&key=…. Parse address_components by types: street_number, route, locality, administrative_area_level_1. For offline scenarios additionally cache last known address in Room with coordinate binding (50 meter match radius).
In Flutter — geocoding package for platform geocoder and google_maps_flutter + direct HTTP requests to Geocoding API for accuracy. Important: geocoding on Android under the hood uses same Geocoder.getFromLocation(), so it can't be called from main isolate.
Address Format for Specific Market
If app works in Russia — add language=en®ion=RU parameter and sort address_components manually: city → street → building. Google returns components in "large to small" order, but Russia expects "small to large" in display string.
For projects with DaData — integrate suggestions/api/4_1/rs/geolocate/address as second provider: works better with non-standard addresses in Russia, knows industrial zones and buildings that Google returns as undefined.
Implementation Steps
Requirements audit: online-only or need offline, single address or batch, target markets. Provider choice and API keys. Service layer implementation with caching. Testing on boundary coordinates: middle of ocean, rural area, industrial zones. UI integration with proper loading state.
Timeline: from one day for basic case (single provider, online) to three days with offline cache, multi-provider, and multiple market support.







