Skip to main content

MapPolyline Class

Contains map polyline settings.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v24.1.dll

NuGet Package: DevExpress.Win.Map


public class MapPolyline :

The following members return MapPolyline objects:


Create a Map Polyline

The following example creates a map polyline:

Map Polyline

var polyline = new MapPolyline() { StrokeWidth = 4, Stroke = Color.Yellow };
polyline.Points.AddRange(new GeoPoint[] {
    new GeoPoint(-29,130),
    new GeoPoint(-40,140),
    new GeoPoint(-20,150)

View Example

Add Polyline Caps

You can display shapes at the beginning and at the end of map polylines. Use StartLineCap and EndLineCap properties for this purpose. The following example specifies the end cap template and shows the default arrow for the polyline start cap:

Map Spline Caps

MapPolyline polyline = new MapPolyline() { StrokeWidth = 2,
                                           Stroke = System.Drawing.Color.Blue };
polyline.Points.AddRange(new GeoPoint[] { new GeoPoint(-6, -4),
                                          new GeoPoint(-3, -10),
                                          new GeoPoint(-6, -20) });

polyline.StartLineCap.Visible = true;
polyline.StartLineCap.Length = 20;
polyline.StartLineCap.Width = 10;

polyline.EndLineCap.Visible = true;
polyline.EndLineCap.Template = new MapUnit[] { new MapUnit(-0.5, 0),
                                               new MapUnit(0, 0.5),
                                               new MapUnit(0.5, 0),
                                               new MapUnit(0, -0.5)};
polyline.EndLineCap.Length = 10;
polyline.EndLineCap.Width = 10;



See Also