Beispiel #1
0
 /// <summary>
 /// 添加照片位置信息
 /// </summary>
 /// <param name="picture"></param>
 /// <returns></returns>
 public static Pictures AddLocationInfo(Pictures picture)
 {
     try
     {
         GPSInfoWebModel model = GPSInfoTool.GetInfo("", picture.GpsLongitude, picture.GpsLatitude);
         string          loc   = model.ToGPSInfoModel().ToString();
         picture.Location = loc;
     }
     catch { }
     return(picture);
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            if (GPSConverter.DeviceGPSToBaiduGPS("iAe652kYOgleRHUYQkW1E8MIHEptnMb5", 120.379235583333, 36.19172925, out double x, out double y))
            {
                Console.WriteLine($"120.379235583333 - 36.19172925");
                Console.WriteLine($"{x} - {y}");
            }


            GPSInfoWebModel model = GPSInfoTool.GetInfo("iAe652kYOgleRHUYQkW1E8MIHEptnMb5", 40.039669, 252.129464);

            if (model != null)
            {
                GPSInfoModel info = model.ToGPSInfoModel();
                Console.WriteLine(info);
            }
            Console.ReadLine();
        }