if (radius10 != 0)
{
}
#endregion
#region 设置预报点标注样式
TextGeometry textGeo = new TextGeometry(Convert.ToDateTime(ybData.Rows[i]["RQSJ"].ToString()).ToString("dd日HH时(预报)"));
textGeo.Font = new Font("Time New Roman", 14);
textGeo.Point = pt;
textGeo.ForeColor = Color.Black;
textGeo.TextPosition = TextPosition.Right;
textGeo.Name = ybData.Rows[i]["hourFlag"].ToString();
textGeo.Tag = ybData.Rows[i]["hourFlag"].ToString();
legendLayer.AddGeometry(textGeo);
#endregion
}
foreach (TFPolyline line in tflineList)
{
ybLayer.AddGeometry(line);
}
foreach (ArrowGeometry arrow in arrowList)
{
ybLayer.AddGeometry(arrow);
}
foreach (TFPoint point in tfPointList)
{
ybLayer.AddGeometry(point);
}
SetYBStatus(type);
}
3、清除台风
public void ClearTF()
{
TrackingLayer lsLayer = MapInstance.Instance.Layers["台风历史路径"] as TrackingLayer;
TrackingLayer legendLayer = MapInstance.Instance.Layers["台风点标注"] as TrackingLayer;
TrackingLayer ybLayer = MapInstance.Instance.Layers["台风预报路径"] as TrackingLayer;
TrackingLayer fqLayer = MapInstance.Instance.Layers["台风风圈"] as TrackingLayer;
lsLayer.ClearGeometries();
legendLayer.ClearGeometries();
ybLayer.ClearGeometries();
fqLayer.ClearGeometries();
lsPointList.Clear();
ybPointList.Clear();
lsLineList.Clear();
ybLineList.Clear();
arrayList.Clear();
LegendList.Clear();
}
4、经过差值计算获取天文潮数据
public DataTable GetSeaTideDataAfferDiff(string stationNO, DateTime beginTime, DateTime endTime)
{
//每刻度对应的时间为400秒,即1/9小时
const int UINTTIME = 400;
DataTable table = GetSeaTideData(stationNO, beginTime, endTime);//数据库得到的都是整点的潮位数据
List<System.Drawing.Point> points = new List<System.Drawing.Point>();
int xAxes = 0; //表示X轴的最大刻度
if (table.Rows.Count > 0)
{
foreach (DataRow row in table.Rows)
{
int y = (int)(Convert.ToDouble(row["TideHeight"].ToString()) * 100);
System.Drawing.Point pt = new Point(xAxes, y);//每个整点在曲线上对应的点,此时每个点的间隔的X轴距离为一小时
points.Add(pt);
xAxes += 9;
<< 上一页 [11] [12] [13] [14] [15] 下一页