0

这是我的代码

GeoCoordinateWatcher geoWatcher = new GeoCoordinateWatcher();

geoWatcher.Start();

Geoposition item = new Geoposition();

if (Double.IsNaN(geoWatcher.Position.Location.Altitude))
  item.Altitude = 0;
else
  item.Altitude = geoWatcher.Position.Location.Altitude;

 item.Longitude = geoWatcher.Position.Location.Longitude;
 item.Latitude = geoWatcher.Position.Location.Latitude;
 geoWatcher.Stop();
 GeoCoordinate=new GeoCoordinate(item.Latitude, item.Longitude, item.Altitude); 

最后一行我得到以下异常。

 Type ArgumentOutOfRangeException
 ExceptionMessage The value of the parameter must be from -180.0 to 180.0.
 Parameter name  value

为什么我得到错误的坐标?

问题是什么?

4

0 回答 0