GeoCoordinateWatcher is not getting GeoCoordinate Speed in emulator?

风格不统一 提交于 2020-01-04 06:33:08

问题


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?


回答1:


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

GeoCoordinateWatcher location not returning speed. NaN instead



来源:https://stackoverflow.com/questions/9258193/geocoordinatewatcher-is-not-getting-geocoordinate-speed-in-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!