如何找到从Android中纬度的重视程度? [英] How to find degree from the latitude value in android?

查看:105
本文介绍了如何找到从Android中纬度的重视程度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个经度和纬度值作为双精度值(37.33168900,-122.03073100)。

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

我想将其转换为像(37 1954,48 1152)度值。

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

你知道吗?感谢名单提前。

Any Idea? Thanx in advance.

推荐答案

应该是一些数学:

(int)37.33168                => 37
37.33168 % 1 = 0.33168       
0.33168 * 60 = 19,905        => 19
19.905 % 1 = 0.905
0.905 * 60                   => 54

同-122(加360,如果性否定值)

same with -122 (add 360 if nagative value)

编辑: 可能有一些API,这我就不知道了。

May be there is some API, which I don't know.

这篇关于如何找到从Android中纬度的重视程度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆