Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Get city cordinates by city name

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 = "http://maps.google.com/maps/geo?output=json&oe=utf-8&q=<CityName>&key=<Map_API_Key>";
req_uri = req_uri.replace(" ", "%20");

HttpClient httpClient = new DefaultHttpClient();

try
{
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 :
java.net.UnknownHostException: Host is unresolved: maps.google.com:80

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

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 7 guests