【发布时间】:2016-01-10 19:50:56
【问题描述】:
我有这种位置格式 (24°13'30.92"N,55°45'51.94"E),我需要通过 android 将其转换为像 (24.225275, 55.764417) 这样的双精度值。
我尝试了类似的方法,但没有成功
String lonStr="24°13'30.92"N";
Double lon=Location.convert(lonStr);
【问题讨论】:
-
值在
degree,minute ,second和方向 -
是的,我知道,我想将其转换为双精度值
-
在您的
onLocationChange(Location location)中访问location.getLongitude()和location.getLatitude() -
substring和indexOf将帮助您检查我的答案。
标签: android google-maps location latitude-longitude