示例#1
0
        public LinePathCollection(LinePathStyle style, bool encodePath, IEnumerable <string> points)
        {
            if (points is null)
            {
                throw new ArgumentNullException(nameof(points));
            }

            Style      = style ?? throw new ArgumentNullException(nameof(style));
            EncodePath = encodePath;
            Points     = new List <string>(points);

            if (Points.Count < 2)
            {
                throw new ArgumentException("There needs to be at least 2 points in a path for it to be renderable.", nameof(points));
            }
        }
示例#2
0
 public LinePathCollection(LinePathStyle style, params LatLngPoint[] points)
     : this(style, false, points)
 {
 }
示例#3
0
 public LinePathCollection(LinePathStyle style, IEnumerable <LatLngPoint> points)
     : this(style, false, points)
 {
 }
示例#4
0
 public LinePathCollection(LinePathStyle style, params string[] points)
     : this(style, false, points)
 {
 }
示例#5
0
 public LinePathCollection(LinePathStyle style, IEnumerable <string> points)
     : this(style, false, points)
 {
 }
示例#6
0
 public LinePathCollection(LinePathStyle style, bool encodePath, params LatLngPoint[] points)
     : this(style, encodePath, points.AsEnumerable())
 {
 }
示例#7
0
 public LinePathCollection(LinePathStyle style, bool encodePath, IEnumerable <LatLngPoint> points)
     : this(style, encodePath, points.Select(p => p.ToString(CultureInfo.InvariantCulture)))
 {
 }