Geolocator在visual studio c ++中没有给出准确的响应

时间:2018-01-08 16:05:51

标签: visual-c++ geolocation

在Visual Studio 2017的UWP C ++应用程序中,我有:

Geolocator^ geolocator = ref new Geolocator();
task<Geoposition^> geopositionTask = create_task(geolocator->GetGeopositionAsync());
geopositionTask.then([this](Geoposition^ place)
{       
    double la = place->Coordinate->Point->Position.Latitude;
    double lo = place->Coordinate->Point->Position.Longitude;
}

我可以从默认值中提高准确度吗?

1 个答案:

答案 0 :(得分:1)

您可以配置Geolocator对象的DesiredAccuracy property

Geolocator^ geolocator = ref new Geolocator();
geolocator->DesiredAccuracy = PositionAccuracy::High;