Exemple #1
0
 public static string QueryAllLayerByPoint(string sLon, string sLat)
 {
     try
     {
         double   x         = double.Parse(sLon);
         double   y         = double.Parse(sLat);
         string   str       = WebGis.QueryAllLayerByPoint(x, y);
         string[] separator = new string[] { ":::" };
         string[] strArray2 = str.Split(separator, StringSplitOptions.RemoveEmptyEntries);
         if (strArray2.Length <= 1)
         {
             return("未知");
         }
         return(strArray2[1]);
     }
     catch (WebException exception)
     {
         Record.execFileRecord("取得详细位置信息(WebService)", sLon + "," + sLat + " " + exception.Message);
         return("未知");
     }
     catch (Exception exception2)
     {
         Record.execFileRecord("取得详细位置信息(WebService)", sLon + "," + sLat + " " + exception2.Message);
         return("未知");
     }
 }
Exemple #2
0
 public static string[] GetDistrictInfo(string[] sIdlonLats)
 {
     try
     {
         return(WebGis.GetDistrictInfo(sIdlonLats));
     }
     catch (WebException exception)
     {
         Record.execFileRecord("取得县市区级位置(WebService)", sIdlonLats + " " + exception.Message);
         return(null);
     }
     catch (Exception exception2)
     {
         Record.execFileRecord("取得县市区级位置(WebService)", sIdlonLats + " " + exception2.Message);
         return(null);
     }
 }
Exemple #3
0
 public static string[] GetRegionNames(string sReginId)
 {
     try
     {
         string[] regionNames = WebGis.GetRegionNames(sReginId);
         if (regionNames.Length <= 1)
         {
             return(null);
         }
         return(regionNames);
     }
     catch (WebException)
     {
         return(null);
     }
     catch (Exception)
     {
         return(null);
     }
 }