Skip to main content
A newer version of this page is available. .

MapPolyline Class

The class used to draw a polyline on a map.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v19.2.dll

Declaration

public class MapPolyline :
    MapShape,
    IPointContainerCore,
    ISupportCoordPoints,
    ISupportIntermediatePoints,
    IEditableItem,
    ISimplifiableItem,
    ISupportLineThickness

The following members return MapPolyline objects:

Remarks

The following image shows an example of a map polyline shape.

MapPolyline

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:

<dxm:MapItemStorage>
    <dxm:MapItemStorage.Items>
        <dxm:MapPolygon>
            <dxm:MapPolygon.Points>
                <dxm:GeoPoint Latitude="-10" Longitude="-170"/>
                <dxm:GeoPoint Latitude="-10" Longitude="170"/>
                <dxm:GeoPoint Latitude="10" Longitude="170"/>
                <dxm:GeoPoint Latitude="10" Longitude="-170"/>
            </dxm:MapPolygon.Points>
        </dxm:MapPolygon>
        <dxm:MapPolygon Fill="Orange">
            <dxm:MapPolygon.Points>
                <dxm:GeoPoint Latitude="30" Longitude="170"/>
                <dxm:GeoPoint Latitude="30" Longitude="190"/>
                <dxm:GeoPoint Latitude="40" Longitude="190"/>
                <dxm:GeoPoint Latitude="40" Longitude="170"/>
            </dxm:MapPolygon.Points>
        </dxm:MapPolygon>
    </dxm:MapItemStorage.Items>
</dxm:MapItemStorage>

The code above produces the following image:

Two polygons one of which crosses the 180th meridian

Example

<dxm:MapPolyline>
    <dxm:MapPolyline.Points>
        <dxm:GeoPoint>0, 0</dxm:GeoPoint>
        <dxm:GeoPoint>-20, -10</dxm:GeoPoint>
        <dxm:GeoPoint>-10, -20</dxm:GeoPoint>
    </dxm:MapPolyline.Points>
</dxm:MapPolyline>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MapPolyline class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also