How to format GPS latitude and longitude?
问题 In android(java) when you get the current latitude and longitude using the function getlatitude() etc you get the coordinates in decimal format: latitude: 24.3454523 longitude: 10.123450 I want to get this into degrees and decimal minutes to look something like this: Latitude: 40°42′51″ N Longitude: 74°00′21″ W 回答1: to conver from decimals to degrees you can do as follow String strLongitude = Location.convert(location.getLongitude(), Location.FORMAT_DEGREES); String strLatitude = Location