GeoCoordinateWatcher在模拟器中没有获得GeoCoordinate Speed? [英] GeoCoordinateWatcher is not getting GeoCoordinate Speed in emulator?

查看:131
本文介绍了GeoCoordinateWatcher在模拟器中没有获得GeoCoordinate Speed?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试跟踪设备的Windows Phone 7地图应用程序.我正在显示一个文本块,该文本块将从传递给"GeoCoordinateWatcher"对象的PositionChanged事件处理程序的参数"GeoPositionChangedEventArgs e"使用"e.Position.Location.Speed.ToString("0.00")"更新当前速度.

I'm trying out a Windows Phone 7 Maps application which tracks the device. I'm displaying a textblock which updates the current speed using "e.Position.Location.Speed.ToString("0.00")" from the "GeoPositionChangedEventArgs e" argument passed to the PositionChanged event handler of "GeoCoordinateWatcher" object.

在仿真器中调试应用程序时,我使用了一组先前记录的图钉并进行了仿真.经度/纬度位置会正确更改,但速度会反映为NAN.

While debugging the application in emulator, I used a set of previously recorded push pins and played the emulation. The longitude/lattitude positions change properly but the speed is reflected as NAN.

为什么会这样?速度属性如何计算?

Why is this happening? How is the speed property calculated?

推荐答案

将您的电话移动到单独的线程将解决此问题...

Moving you call to separate thread will fixed the problem...

GeoCoordinateWatcher位置未返回速度. NaN代替

这篇关于GeoCoordinateWatcher在模拟器中没有获得GeoCoordinate Speed?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆