Re: [android-developers] Unable to get Latitude and Longitude of Address using Geocoder

2011-10-28 Thread MANISH RAJ
HI,
  I was facing the same problem then i used the following code to convert
Addresses to Latitude and Longitude. In your case you are using
Locale.ENGLISH. I think use default Locale that may resolve this


 Geocoder geocoder = new Geocoder(this, Locale.getDefault());
try {
ListAddress locations = geocoder.getFromLocationName(1600
Amphitheatre
Parkway, Mountain View, CA, 5);

Regards,
manish


Manish Kumar
Computer Science and Engineering (2008-2012)
Govt. Model Engineering College
Cochin-21
+919287301035
manishrajja...@gmail.com

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Unable to get Latitude and Longitude of Address using Geocoder

2011-10-28 Thread Nireesha Yarlagadda
Thanks manish

On Fri, Oct 28, 2011 at 1:23 PM, MANISH RAJ manishrajja...@gmail.comwrote:

 HI,
   I was facing the same problem then i used the following code to convert
 Addresses to Latitude and Longitude. In your case you are using
 Locale.ENGLISH. I think use default Locale that may resolve this


  Geocoder geocoder = new Geocoder(this, Locale.getDefault());
 try {
 ListAddress locations = geocoder.getFromLocationName(1600
 Amphitheatre
 Parkway, Mountain View, CA, 5);

 Regards,
 manish

 
 Manish Kumar
 Computer Science and Engineering (2008-2012)
 Govt. Model Engineering College
 Cochin-21
 +919287301035
 manishrajja...@gmail.com

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Unable to get Latitude and Longitude of Address using Geocoder

2011-10-27 Thread Nireesha Yarlagadda
Hi,

This the code im using.

Geocoder coder = new Geocoder(getBaseContext(), Locale.ENGLISH);
 ListAddress foundGeocode = null;
/* find the addresses  by using 
getFromLocationName() method with
the given address*/
try {

foundGeocode = 
coder.getFromLocationName(1600 Amphitheatre
Parkway, Mountain View, CA,5);
Log.i(values, Lat = 
+foundGeocode.get(0).getLatitude());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Log.i(Geocode Error,Exception);
}

when I run this code this is exception I get
10-27 17:17:46.673: WARN/System.err(3206): java.io.IOException:
Service not Available

and foundGeocode value is always null

Can anyone help me with this

Thanks in Advance,
Nireesha Yarlagadda

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en