private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.bindingSource1.DataSource != null) { List <Ephemeris> fitedResult = this.bindingSource1.DataSource as List <Ephemeris>; List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); foreach (var item in fitedResult) { var pt = new AnyInfo.Geometries.Point(item.GeoCoord, item.Time.ToString(), item.Prn.ToString()); lonlats.Add(pt); } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }
private void button_showMap_Click(object sender, EventArgs e) { if (moonGeo != null && sunGeo != null && ShowLayer != null) { AnyInfo.Geometries.Point sunpt = new AnyInfo.Geometries.Point(sunGeo, "1", "太阳"); AnyInfo.Geometries.Point moonpt = new AnyInfo.Geometries.Point(moonGeo, "2", "月亮"); List <AnyInfo.Geometries.Point> lonLats = new List <AnyInfo.Geometries.Point>() { sunpt, moonpt }; Layer layer = LayerFactory.CreatePointLayer(lonLats); ShowLayer(layer); } }
private void button_showOnMap_Click(object sender, EventArgs e) { if (ShowLayer != null && this.bindingSource1.DataSource != null) { List <AnyInfo.Geometries.Point> lonlats = new List <AnyInfo.Geometries.Point>(); int i = 0; foreach (ClockSolnStation item in _clockFile.Header.ClockSolnStations) { var pt = new AnyInfo.Geometries.Point(item.GeoCoord, i + "", item.Name); lonlats.Add(pt); i++; } if (lonlats.Count == 0) { return; } Layer layer = LayerFactory.CreatePointLayer(lonlats); ShowLayer(layer); } }