Back to Devexpress

MapPolylineBase.Points Property

windowsforms-devexpress-dot-xtramap-dot-mappolylinebase.md

latest2.7 KB
Original Source

MapPolylineBase.Points Property

Gets or sets a collection of points that defines the map polyline.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public CoordPointCollection Points { get; set; }
vb
Public Property Points As CoordPointCollection

Property Value

TypeDescription
CoordPointCollection

A collection of CoordPoint class descendant objects.

|

Remarks

Note that, a map shape should fulfill the following condition to cross the 180th meridian: one or several points’ longitudes should exceed the 180 (-180) limit:

csharp
MapPolygon polygon = new MapPolygon();
polygon.Points.Add(new GeoPoint(10, -170));
polygon.Points.Add(new GeoPoint(10, 170));
polygon.Points.Add(new GeoPoint(-10, 170));
polygon.Points.Add(new GeoPoint(-10, -170));
vectorItemStorage.Items.Add(polygon);

// Point longitudes enclose the 180 meridian.
MapPolygon polygonCross180 = New MapPolygon();
polygonCross180.Fill = Color.Orange;
polygonCross180.Points.Add(new GeoPoint(30, 190));
polygonCross180.Points.Add(new GeoPoint(30, 170));
polygonCross180.Points.Add(new GeoPoint(20, 170));
polygonCross180.Points.Add(new GeoPoint(20, 190));
vectorItemStorage.Items.Add(polygon180);
vb
Dim polygon = New MapPolygon
polygon.Points.Add(New GeoPoint(10, -170))
polygon.Points.Add(New GeoPoint(10, 170))
polygon.Points.Add(New GeoPoint(-10, 170))
polygon.Points.Add(New GeoPoint(-10, -170))
vectorItemStorage.Items.Add(polygon)

' Point longitudes enclose the 180 meridian.
Dim polygonCross180 = New MapPolygon
polygonCross180.Fill = Color.Orange
polygonCross180.Points.Add(New GeoPoint(30, 190))
polygonCross180.Points.Add(New GeoPoint(30, 170))
polygonCross180.Points.Add(New GeoPoint(20, 170))
polygonCross180.Points.Add(New GeoPoint(20, 190))
vectorItemStorage.Items.Add(polygonCross180)

The code above produces the following image:

See Also

MapPolylineBase Class

MapPolylineBase Members

DevExpress.XtraMap Namespace