Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find degree from the latitude value in android?

I have a latitude and longitude values as a double value(37.33168900, -122.03073100).

I want to convert it to the degree value like (37 19' 54 ,48 11' 52 ).

Any Idea? Thanx in advance.

like image 334
Praveen Avatar asked Nov 18 '10 12:11

Praveen


1 Answers

This will give you Strings in degrees, minutes and seconds of arc:

String strLongitude = location.convert(location.getLongitude(), location.FORMAT_SECONDS);
String strLatitude = location.convert(location.getLatitude(), location.FORMAT_SECONDS);

.

like image 61
NickT Avatar answered Nov 01 '22 20:11

NickT