you can do it by this way
https://www.google.com/latitude/apps -> Enable and show best available/Enable and show city-level only
Then you can get JSON or ATOM format user details from latitude and then you can get the location. I used JSON format and for that i wanted a JSON parser. I found a JSON parser form here.(JSON parser and other necessary utils )
then after integration of those you just want to call its like this
Location l =LatitudeJSONParser.getPosition("http://www.google.com/latitude/apps/badge/api?user=" + userid+ "&type=json");
The JSON parer returns a Location object and we can get latitude and longitude from that object.
String latitude = l.getLatitude();
String longitude = l.getLongitude();
String time=l.getTime();
After getting location you have to map the user with user id. And thats all we have to do....