|
@@ -1,9 +1,7 @@
|
|
|
using DevExpress.Export.Xl;
|
|
|
-using DevExpress.Internal;
|
|
|
using DevExpress.Map;
|
|
|
using DevExpress.Map.Native;
|
|
|
using DevExpress.Utils;
|
|
|
-using DevExpress.Utils.About;
|
|
|
using DevExpress.Utils.Helpers;
|
|
|
using DevExpress.Utils.Svg;
|
|
|
using DevExpress.XtraBars;
|
|
@@ -17,24 +15,16 @@ using DxHelper;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
-using System.Configuration;
|
|
|
using System.Data.Common;
|
|
|
-using System.Data.Entity.Core.Metadata.Edm;
|
|
|
using System.Data.SQLite;
|
|
|
using System.Drawing;
|
|
|
using System.Drawing.Imaging;
|
|
|
using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Reflection;
|
|
|
-using System.Security.Policy;
|
|
|
using System.Text;
|
|
|
-using System.Threading;
|
|
|
-using System.Windows.Controls;
|
|
|
using System.Windows.Forms;
|
|
|
-using System.Windows.Shapes;
|
|
|
-using XdCxRhDW.App;
|
|
|
using XdCxRhDW.Entity;
|
|
|
-using XdCxRhDW.Repostory;
|
|
|
|
|
|
public enum GoogleMapType
|
|
|
{
|
|
@@ -1643,7 +1633,6 @@ public static class MapControlEx
|
|
|
public static MapPolyline GetLine(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines)
|
|
|
{
|
|
|
if (lines == null || !lines.Any()) return null;
|
|
|
- var innerData = ctrl.Tag as InnerData;
|
|
|
var polyLine = new MapPolyline()
|
|
|
{
|
|
|
EnableSelection = DefaultBoolean.False,
|
|
@@ -1662,7 +1651,6 @@ public static class MapControlEx
|
|
|
|
|
|
|
|
|
};
|
|
|
- polyLine.pr.
|
|
|
bool isShowPattern = lines.Count() > 400;
|
|
|
if (isShowPattern)
|
|
|
{
|
|
@@ -1685,6 +1673,50 @@ public static class MapControlEx
|
|
|
}
|
|
|
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
+ public static MapPolyline GetLine(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines,bool isShowPattern=false)
|
|
|
+ {
|
|
|
+ if (lines == null || !lines.Any()) return null;
|
|
|
+ var polyLine = new MapPolyline()
|
|
|
+ {
|
|
|
+ EnableSelection = DefaultBoolean.False,
|
|
|
+ EnableHighlighting = DefaultBoolean.True,
|
|
|
+ Stroke = ColorHelper.GetColor(title),
|
|
|
+ StrokeWidth = 2,
|
|
|
+ HighlightedStrokeWidth = 4,
|
|
|
+ IsGeodesic = true,
|
|
|
+ CanResize = false,
|
|
|
+ CanEdit = false,
|
|
|
+ CanRotate = false,
|
|
|
+ IsHitTestVisible = true,
|
|
|
+ CanMove = false,
|
|
|
+ Tag = $"DrawDtoLine_{title}",
|
|
|
+ ToolTipPattern = $"{title}",
|
|
|
+
|
|
|
+
|
|
|
+ };
|
|
|
+ if (isShowPattern)
|
|
|
+ {
|
|
|
+ polyLine.TitleOptions.Pattern = title;
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach (var item in lines)
|
|
|
+ {
|
|
|
+ if (double.IsNaN(item.lat) || double.IsNaN(item.lon)) continue;
|
|
|
+ polyLine.Points.Add(new GeoPoint(item.lat, item.lon));
|
|
|
+
|
|
|
+ }
|
|
|
+ if (!polyLine.Points.Any())
|
|
|
+ {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return polyLine;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|