/// <summary> /// 地图显示地震标注 /// </summary> /// <param name="gmapcontrol"></param> public void annoEqkList(GMap.NET.WindowsForms.GMapControl gmapcontrol = null) { try { int[] rowNum = this.gridView.GetSelectedRows(); double lg = 0; double la = 0; List <EqkBean> eqkMapList = new List <EqkBean>(); MyGMap.ClearAllEqkMarker(gmapcontrol); for (int index = 0; index < rowNum.Length; index++) { int i = rowNum[index]; eqkMapList.Add(eqkDataList[i]); lg += eqkDataList[i].Longtitude; la += eqkDataList[i].Latitude; } string linecode = lineTag.ToString().Split(',')[1]; string sitecode = LineBll.Instance.GetSitecodeByLinecode(linecode); double lon = double.Parse(xxkUI.Bll.SiteBll.Instance.GetNameByID("LONGTITUDE", "SITECODE", sitecode)); double lat = double.Parse(xxkUI.Bll.SiteBll.Instance.GetNameByID("LATITUDE", "SITECODE", sitecode)); MyGMap.CreateCircle(new PointLatLng(lat, lon), double.Parse(this.textEdit8.Text), double.Parse(textEdit7.Text), gmapcontrol); MyGMap.AnnotationEqkToMap(eqkMapList, gmapcontrol); gmapcontrol.Position = new PointLatLng(la / rowNum.Length, lg / rowNum.Length); gmapcontrol.Zoom = 6; } catch (Exception ex) { throw new Exception(ex.Message); } }