|
@@ -1353,7 +1353,28 @@ public static class MapControlEx
|
|
|
};
|
|
|
return ctrl;
|
|
|
}
|
|
|
-
|
|
|
+ public static void Drea(this MapControl ctrl,double Lon,double Lat)
|
|
|
+ {
|
|
|
+ var innerData = ctrl.Tag as InnerData;
|
|
|
+ var mapItem = new MapDot()
|
|
|
+ {
|
|
|
+ EnableHighlighting = DefaultBoolean.True,
|
|
|
+ EnableSelection = DefaultBoolean.False,
|
|
|
+ CanMove = false,
|
|
|
+ Visible = true,
|
|
|
+ IsHitTestVisible = true,
|
|
|
+ Fill = Color.FromArgb(128, 255, 93, 106),
|
|
|
+ Size = 200,
|
|
|
+ Tag = "天线",
|
|
|
+ Location = new GeoPoint(Lat, Lon),
|
|
|
+ StrokeWidth = 0,
|
|
|
+ };
|
|
|
+ // var style = mapItem as MapItemStyle;
|
|
|
+ // innerData._dataCache.Add(item, mapItem);
|
|
|
+ innerData.posStorge.Items.Add(mapItem);
|
|
|
+ var idx = innerData.posStorge.Items.IndexOf(mapItem);
|
|
|
+ innerData.posStorge.Items.Swap(idx, innerData.posStorge.Items.Count - 1);
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// 绘制矩形
|
|
|
/// </summary>
|
|
@@ -1426,7 +1447,7 @@ public static class MapControlEx
|
|
|
if (!polyLine.Points.Any()) return;
|
|
|
innerData.mMapStorage.Items.Add(polyLine);
|
|
|
}
|
|
|
- public static void DrawDtoLine(this MapControl ctrl,string title, IEnumerable<(double lon, double lat)> lines)
|
|
|
+ public static void DrawDtoLine(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines)
|
|
|
{
|
|
|
if (lines == null || !lines.Any()) return;
|
|
|
var innerData = ctrl.Tag as InnerData;
|
|
@@ -1474,12 +1495,12 @@ public static class MapControlEx
|
|
|
Size = 4,
|
|
|
Tag = $"DrawPoint_{title}{lines.ElementAt(i).lon}",
|
|
|
Location = new GeoPoint(p.lat, p.lon),
|
|
|
- ToolTipPattern= $"{title}",
|
|
|
+ ToolTipPattern = $"{title}",
|
|
|
|
|
|
};
|
|
|
list.Add(mapItem);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (!list.Any()) return;
|
|
|
innerData.mMapStorage.Items.AddRange(list);
|
|
|
}
|
|
@@ -1578,7 +1599,7 @@ public static class MapControlEx
|
|
|
var innerData = ctrl.Tag as InnerData;
|
|
|
return innerData.mMapStorage;
|
|
|
}
|
|
|
- public static void RemoveFlag(this MapControl ctrl,string flag)
|
|
|
+ public static void RemoveFlag(this MapControl ctrl, string flag)
|
|
|
{
|
|
|
var innerData = ctrl.Tag as InnerData;
|
|
|
var items = innerData.mMapStorage.Items.ToList().FindAll(p => p.Tag != null && p.Tag.ToString() == flag);
|