制作一个定位对象的Andr​​oid与纬度和经度值经度、纬度、对象、oid

由网友(幸福右边、荒芜人烟)分享简介:予具有其中一个位置的纬度和经度值存储在数据库中,这是我下载一个程序。 I have a program in which latitude and longitude values of a location are stored in a database, which I download. 我想获得这些坐标之...

予具有其中一个位置的纬度和经度值存储在数据库中,这是我下载一个程序。

I have a program in which latitude and longitude values of a location are stored in a database, which I download.

我想获得这些坐标之间的距离,和我现在的位置。

I want to get the distance between these coordinates, and my current location.

该位置类有一个简单的方法来找到两个位置的物体之间的距离,所以我想我会做一个定位对象的坐标,然后调用方法。

The Location class has a simple method to find the distance between two Location objects, so I figured I'd make a Location object with the coordinates, then call the method.

有没有一种简单的方法来做到这一点?此外,如果有另外一个可靠的,非常简单的公式,不会弄乱的东西太多了,那工作了。谢谢。

Is there an easy way to do this? Also, if there's another reliable, fairly simple equation that won't clutter things too much, that would work too. Thanks.

(android.location.Location)

(android.location.Location)

推荐答案

您是否在寻找this?

这似乎并不真正需要做的地点类,所以可能更适合你

It doesn't seem to require actually making a location class so might be more suited to you

修改请参阅下面的答案。这是更好

Edit Please see the answer below. It's much better

阅读全文

相关推荐

最新文章