MapPolyline Class
Contains map polyline settings.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.2.dll
Declaration
Related API Members
The following members return MapPolyline objects:
Remarks
Create a Map Polyline
The following example creates a 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)
});
ItemStorage.Items.Add(polyline);
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:
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;
ItemStorage.Items.Add(polyline);
Inheritance
Object
MapItem
MapShape
MapPolylineBase
MapPolyline
See Also