📌  相关文章
📜  在android中获取当前位置的经纬度 - C#代码示例

📅  最后修改于: 2022-03-11 14:48:54.381000             🧑  作者: Mango

代码示例2
GetLastKnownLocationAsync();
        GetLocationAsync();
        GetLocationAsync(GeolocationRequest request);
        GetLocationAsync(GeolocationRequest request, CancellationToken cancelToken);
        

We will use GetLocationAsync in this example. This function will coordinates using device GPS.

      var location = await Geolocation.GetLocationAsync();
                    if (location != null)
                    {
                              double _log = location.Longitude;
                     double _lat = location. Latitude;
                    }