由网友(残梦°)分享简介:我检索地图视图的中心,我需要通过多头和拉特的双打,以我的服务器对数据库进行测试。 I am retrieving the center of a map view and i need to pass the longs and lats as doubles to my server for testing aga...
我检索地图视图的中心,我需要通过多头和拉特的双打,以我的服务器对数据库进行测试。
I am retrieving the center of a map view and i need to pass the longs and lats as doubles to my server for testing against the database .
我将如何去有关转换mapView.getMapCenter()。getLongitudeE6()为双?
How would i go about converting mapView.getMapCenter().getLongitudeE6() to a double ?
推荐答案
调用 mapView.getMapCenter()
返回的GeoPoint
。 GeoPoint.getLongitudeE6()
和 GeoPoint.getLatitudeE6()
都返回microdegrees(基本上度* 1E6)。
Calling mapView.getMapCenter()
returns a GeoPoint
. GeoPoint.getLongitudeE6()
and GeoPoint.getLatitudeE6()
both return microdegrees (basically degrees * 1E6).
所以,在Java中,以microdegrees转换为度简单地做:
So, in Java, to convert microdegrees to degrees simply do:
public static double microDegreesToDegrees(int microDegrees) {
return microDegrees / 1E6;
}
相关推荐
最新文章