From 1a204747c1074d4c56c5926f7c15e5c134d516fa Mon Sep 17 00:00:00 2001
From: 温居城 <wenjucheng@wenjuchengdeMacBook-Pro.local>
Date: 星期五, 19 十一月 2021 18:19:20 +0800
Subject: [PATCH] 20201-11-19-01

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
index d6d5c43..6fa0d75 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs
@@ -193,12 +193,17 @@
                         //绂诲紑鍦扮偣
                         strname = Language.StringByID(StringId.likai);
                     }
-                    //绾害
-                    latitude = Convert.ToDouble(input.geo_fence.latitude);
-                    //缁忓害
-                    longitude = Convert.ToDouble(input.geo_fence.longitude);
-                    //鍗婂緞
-                    r = int.Parse(input.geo_fence.radius);
+                    if (!string.IsNullOrEmpty(input.geo_fence.latitude) && !string.IsNullOrEmpty(input.geo_fence.longitude))
+                    {
+                        //绾害
+                        var latitude1 = Convert.ToDouble(input.geo_fence.latitude);
+                        //缁忓害
+                        var longitude1 = Convert.ToDouble(input.geo_fence.longitude);
+                        //鍗婂緞
+                        r = int.Parse(input.geo_fence.radius);
+                        //WGS84鍧愭爣杞珮寰峰潗鏍�
+                        LogicMethod.CurrLogicMethod.WGS84_to_GCJ02(longitude1, latitude1, out longitude, out latitude);
+                    }
                 }
             }
             PublicInterface publicInterface = new PublicInterface();

--
Gitblit v1.8.0