windows phone 8.1地图移动速度

时间:2015-05-10 12:02:03

标签: geolocation position windows-phone-8.1 maps

我正在努力获得运动的速度,但它不起作用,我不知道为什么。这是我试过的

async private void locator_PositionChanged(Geolocator sender, PositionChangedEventArgs e)
    {
        await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
        {
            Geoposition geoPosition = e.Position;
            GeolocatorPositionChanged(geoPosition);

            var speed = e.Position.Coordinate.Speed; // en metres
            speed = speed * 3600 / 1000;
            speedTextBlock.Text = "speed : " + Convert.ToString(speed) ;
        });
    }

但是coordinate.speed总是返回5.8(米/秒)!

0 个答案:

没有答案