You want to use the reverse geocoding API. For instance:
If you are already using the Bing.Maps SDK, you must use the Map.SearchManager property to get the SearchManager and then use the ReverseGeocodeAsync method. In particular, as noted in the comments, mixing and matching the API that you use to display data through other SDKs may violate the conditions of both: be careful what technologies you use within the same application. (Although this question provides sample code using the Bing Maps SDK, I have kept the list above to help others, which may have a slightly different context.)
For instance:
var manager = map.SearchManager; var request = new ReverseGeocodeRequestOptions(location) { IncludeEntityTypeFlags = ReverseGeocodeEntityType.CountryRegion }; var response = await manager.ReverseGeocodeAsync( new ReverseGeocodeRequestOptions(location) { );
If you decide to use the Geonames API, the data can also be downloaded for offline use.
source share