From 3db5c3218f405795dc9a2d0f6afdde8ab8ac9e73 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 23 十一月 2021 09:11:30 +0800 Subject: [PATCH] Merge branch 'WJC' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into WJC --- HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddInputType.cs index 1c15401..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(); @@ -297,7 +302,7 @@ MainPage.BasePageView.AddChidren(addLogic); addLogic.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }, strname, Language.StringByID(R.MyInternationalizationString.uSave), true, latitude, longitude, r); + }, strname, Language.StringByID(StringId.save), true, latitude, longitude, r); #endif }); -- Gitblit v1.8.0