0

使用MyLocationOverlayI 获取用户的当前 GeoPoint。

        myLocationOverlay.RunOnFirstFix (() => {
            mapView.Controller.AnimateTo (myLocationOverlay.MyLocation);
            RunOnUiThread (() => {
                DisplayIncidentsNearMe (myLocationOverlay.MyLocation);}
            );
        }
        );

但是,要 ReverseGeoCode 该位置,我需要 Lat/Lng。MyLocationOverlay 中的 GeoPoint 采用 LatitudeE6 格式,因此不起作用。

如何从返回的位置对象中获取“正常”纬度/经度MyLocationOverlay

        Geocoder geo = new Geocoder (this, Java.Util.Locale.Default);
        var ad = geo.GetFromLocation (myLocation.LatitudeE6, myLocation.LongitudeE6, 1);
4

1 回答 1

0

GeoPoint 文档中,LatitudeE6 是:

此 GeoPoint 的纬度,以微度(度 * 1E6)为单位。

您可以通过除以 1e6 将此数字转换回度数:

double degrees = myLocation.LatitudeE6 / 1e6;
于 2012-05-26T12:17:57.047 回答