Back to Devexpress

MapPath Class

wpf-devexpress-dot-xpf-dot-map-d2499d58.md

latest4.1 KB
Original Source

MapPath Class

The class used to draw a path on a map.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public class MapPath :
    MapShape,
    IPathCore,
    ISupportCoordPoints,
    IEditableItem,
    ISimplifiableItem
vb
Public Class MapPath
    Inherits MapShape
    Implements IPathCore,
               ISupportCoordPoints,
               IEditableItem,
               ISimplifiableItem

The following members return MapPath objects:

Remarks

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

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:

xml
<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:

Example

View Example

xaml
<dxm:MapPath>
    <dxm:MapPath.Data>
        <dxm:MapPathGeometry>
            <dxm:MapPathGeometry.Figures>
                <dxm:MapPathFigure>
                    <dxm:MapPathFigure.StartPoint>
                        <dxm:GeoPoint>-35, 40</dxm:GeoPoint>
                    </dxm:MapPathFigure.StartPoint>
                    <dxm:MapPathFigure.Segments>
                        <dxm:MapPolyLineSegment>
                            <dxm:MapPolyLineSegment.Points>
                                <dxm:GeoPoint>-50, 60</dxm:GeoPoint>
                                <dxm:GeoPoint>-55, 55</dxm:GeoPoint>
                                <dxm:GeoPoint>-50, 65</dxm:GeoPoint>
                            </dxm:MapPolyLineSegment.Points>
                        </dxm:MapPolyLineSegment>
                    </dxm:MapPathFigure.Segments>
                </dxm:MapPathFigure>
            </dxm:MapPathGeometry.Figures>
        </dxm:MapPathGeometry>
    </dxm:MapPath.Data>
</dxm:MapPath>

Implements

IColorizerElement

IEditableItem

Inheritance

Object DispatcherObject DependencyObject Freezable MapDependencyObject MapItem MapShapeBase MapShape MapPath

See Also

MapPath Members

DevExpress.Xpf.Map Namespace