GeoCoordinateWatcher 未在模拟器中获取 GeoCoordinate Speed?
我正在尝试跟踪设备的 Windows Phone 7 地图应用程序。我正在显示一个文本块,该文本块使用“e.Position.Location.Speed.ToString("0.00")”从传递给“GeoCooperativeWatcher”对象的 PositionChanged 事件处理程序的“GeoPositionChangedEventArgs e”参数中更新当前速度。
在模拟器中调试应用程序时,我使用了一组先前录制的图钉并播放了模拟。经度/纬度位置变化正常,但速度反映为 NAN。
为什么会发生这种情况?速度属性是如何计算的?
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.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将您的调用移至单独的线程将解决问题...
GeoCooperativeWatcher 位置不返回速度。改为 NaN
Moving you call to separate thread will fixed the problem...
GeoCoordinateWatcher location not returning speed. NaN instead