Skip to content
Shiny.NET

Reverse Geocoding

Downloads NuGet downloads for Shiny.Locations
Operating Systems
Android
iOS

Reverse geocoding turns a Position into a readable address: street, city, region, postal code and country. Shiny uses the geocoder built into each platform, so there is no API key to manage, but it needs network access.

Platform Geocoder
iOS / Mac Catalyst 26+ MapKit MKReverseGeocodingRequest
iOS / Mac Catalyst 15-25 CoreLocation CLGeocoder
Android 33+ android.location.Geocoder (listener API)
Android < 33 android.location.Geocoder (run off the calling thread)
Windows, Blazor Not supported - AddGeocoding() registers nothing
using Shiny;
services.AddGeocoding();

Reverse geocoding doesn’t need a location permission, because you pass it the position. Getting that position from the GPS still does.

Inject IGeocoder:

public class AddressService(IGeocoder geocoder, IGpsManager gps)
{
public async Task<string?> GetCurrentAddress(CancellationToken ct)
{
if (!geocoder.IsSupported)
return null;
var reading = await gps.GetLastReadingOrCurrentPosition(cancellationToken: ct);
if (reading == null)
return null;
var placemarks = await geocoder.ReverseGeocode(reading.Position, ct);
return placemarks.FirstOrDefault()?.FormattedAddress;
}
}

ReverseGeocode returns the matches, most relevant first, and an empty list when nothing matched.

Property Description
Position The position the placemark describes
Name Name of the place: a landmark or business, or the street address
SubThoroughfare Street number
Thoroughfare Street name
SubLocality Neighbourhood or district
Locality City or town
SubAdministrativeArea County or equivalent
AdministrativeArea State, province or equivalent
PostalCode Postal or zip code
CountryCode ISO 3166-1 alpha-2 country code
CountryName Localized country name
FormattedAddress The full address on one line, formatted by the platform

A component the platform couldn’t resolve is null. Results come back in the device’s language.

claude plugin marketplace add shinyorg/skills
claude plugin install shiny@shiny

One plugin installs all 37 Shiny skills. Your agent loads only the skill relevant to what you're building, so there's no cost to having them all available.

copilot plugin marketplace add https://github.com/shinyorg/skills
copilot plugin install shiny@shiny

One plugin installs all 37 Shiny skills. Your agent loads only the skill relevant to what you're building, so there's no cost to having them all available.

View shiny-locations Skill