A newer version of this page is available. Switch to the current version.

MapLine Class

The class used to draw a line on a map.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v19.1.dll

Declaration

public class MapLine :
    MapShape,
    ISupportCoordPoints,
    ISupportIntermediatePoints,
    IEditableItem,
    IMapLineCore
Public Class MapLine
    Inherits MapShape
    Implements ISupportCoordPoints,
               ISupportIntermediatePoints,
               IEditableItem,
               IMapLineCore

Related API Members

The following members accept/return MapLine objects:

Remarks

The following image shows an example of a map line object.

MapLineExample

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:


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);

The code above produces the following image:

map-control__cross-180th-meridian

Examples

ItemStorage.Items.Add(new MapLine { Point1 = new GeoPoint(-30, 20), Point2 = new GeoPoint(-35, 25), Stroke = Color.Red, StrokeWidth = 4 });

Inheritance

See Also