This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Generates exception in reverse geocoding using nominatim.

0

I'm creating asp.net website and using Nominatim for reverse geocoding to find address in simple text format.

My Code:

WebClient webClient = new WebClient();
var jsonData = webClient.DownloadData("http://nominatim.openstreetmap.org/reverse?format=json&lat=23.02951&lon=72.48689");
DataContractJsonSerializer ser = new DataContractJsonSerializer(typeof(RootObject));
var rootObject = ser.ReadObject(new MemoryStream(jsonData));

But got exception that

The remote name could not be resolved: 'nominatim.openstreetmap.org'

Actually I got null response from the page.

Any suggestion there?

asked 27 Dec '13, 07:51

netX's gravatar image

netX
1111
accept rate: 0%

edited 27 Dec '13, 15:41

iii's gravatar image

iii
4.9k84082

You are welcome here anytime and OSM community likes to help :)
But please try to avoid crosspostings, as they consume a lot of ressources of the people that like to help you: http://stackoverflow.com/questions/20795389/reverse-geocoding-using-nominatim-in-asp-net

(27 Dec '13, 15:43) iii

One Answer:

2

Try the URL in a browser on the same machine. It works fine here. If errors persist, must be a network issue on the machine where the code runs.

answered 27 Dec '13, 10:42

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .