Get city cordinates by city name

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Get city cordinates by city name

Postby Kamal » Mon Jun 08, 2009 2:18 pm

Hi All,

I am trying to animate map to user defined City...

I am not sure if this is the way... Here is my code :

String req_uri = "<CityName>&key=<Map_API_Key>";
req_uri = req_uri.replace(" ", "%20");

HttpClient httpClient = new DefaultHttpClient();

HttpGet method = new HttpGet(new URI(req_uri));
HttpResponse response = httpClient.execute(method);

if (response != null)
result = response.getEntity().toString();
catch (Exception e)
Log.d("HTTP Error", e.toString());

By doing so, I get exception at HttpResponse response = httpClient.execute(method);...

The Exception is : Host is unresolved:

Helps are appreciated...... :)
Junior Developer
Junior Developer
Posts: 23
Joined: Wed May 27, 2009 11:15 am


Return to Map Problems

Who is online

Users browsing this forum: No registered users and 2 guests