开发者

Some simple questions about geolocation (GPS) values from Android [duplicate]

This question already has answers here: Android GeoPoint with lat/long values (4 answers) Closed 8 years ago.

The long/lat coords format that I seem to get back from Android (Phonegap) are decimal.

Ma开发者_运维知识库y I know what are the ranges of both the longitude and latitude values?

Also, how can I find distance between 2 points in the decimal format? Thanks!


For calculating distance between 2 points, have a look at the haversine formula. A javascript-implementation that can be used with phonegap is described here: http://www.movable-type.co.uk/scripts/latlong.html


Latitude and longitude are specified in millionths of a degree: divide each value by 1000000 (and convert to float or double) to get the true degrees.

Similar question:

Android GeoPoint with lat/long values

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜