|
@@ -35,6 +35,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|
|
using XzXdDw.App.Model;
|
|
|
using DevExpress.XtraCharts.Native;
|
|
|
using DevExpress.Utils.Extensions;
|
|
|
+using System.Windows.Ink;
|
|
|
//using RHDW.Model;
|
|
|
|
|
|
/// <summary>
|
|
@@ -1450,6 +1451,38 @@ public static class MapControlEx
|
|
|
if (!polyLine.Points.Any()) return;
|
|
|
innerData.mMapStorage.Items.Add(polyLine);
|
|
|
}
|
|
|
+ public static void DrawDtoPonit(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines)
|
|
|
+ {
|
|
|
+ if (lines == null || !lines.Any()) return;
|
|
|
+ var innerData = ctrl.Tag as InnerData;
|
|
|
+
|
|
|
+ List<MapDot> list = new List<MapDot>();
|
|
|
+ var color = ColorHelper.GetColor(title);
|
|
|
+ for (int i = 0; i < lines.Count(); i++)
|
|
|
+ {
|
|
|
+ var p = lines.ElementAt(i);
|
|
|
+ if (p.lon < -180 || p.lon > 180) continue;
|
|
|
+ if (p.lon == 0 && p.lon == 0) continue;
|
|
|
+ var mapItem = new MapDot()
|
|
|
+ {
|
|
|
+ EnableHighlighting = DefaultBoolean.True,
|
|
|
+ EnableSelection = DefaultBoolean.False,
|
|
|
+ CanMove = false,
|
|
|
+ Visible = true,
|
|
|
+ IsHitTestVisible = true,
|
|
|
+ Fill = color,
|
|
|
+ Size = 4,
|
|
|
+ Tag = $"DrawPoint_{title}{lines.ElementAt(i).lon}",
|
|
|
+ Location = new GeoPoint(p.lat, p.lon),
|
|
|
+ ToolTipPattern= $"{title}",
|
|
|
+
|
|
|
+ };
|
|
|
+ list.Add(mapItem);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!list.Any()) return;
|
|
|
+ innerData.mMapStorage.Items.AddRange(list);
|
|
|
+ }
|
|
|
public static void DrawErrEllipse(this MapControl ctrl, double r1, double r2, IEnumerable<(double lon, double lat)> lines)
|
|
|
{
|
|
|
if (lines == null || !lines.Any()) return;
|