MapPolyline Class

Contains map polyline settings.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v21.1.dll

Declaration

public class MapPolyline :
    MapPolylineBase

The following members accept/return MapPolyline objects:

Remarks

Create a Map Polyline

The following example creates a map polyline:

MapPolyline

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

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 a custom end cap shape, shows the default arrow for the MapPolyline start cap, and sets their dimensions:

Map Polyline Caps

<dxm:MapPolyline Stroke="Blue">
   <dxm:MapPolyline.StrokeStyle>
       <dxm:StrokeStyle Thickness="2"/>
   </dxm:MapPolyline.StrokeStyle>
   <dxm:MapPolyline.Points>
       <dxm:GeoPoint>-6, -4</dxm:GeoPoint>
       <dxm:GeoPoint>-3, -10</dxm:GeoPoint>
       <dxm:GeoPoint>-6, -20</dxm:GeoPoint>
   </dxm:MapPolyline.Points>
   <dxm:MapPolyline.StartLineCap>
       <dxm:MapLineCap Visible="True" Length="15" Width="8"/>
   </dxm:MapPolyline.StartLineCap>
   <dxm:MapPolyline.EndLineCap>
       <dxm:MapLineCap  Visible="True" Length="10" Width="5">
           <dxm:MapLineCap.Geometry>
               <PathGeometry Figures="M 0, 0 L 0,-0.5 L 0.5,-0.5 L 0.5, 0.5 L 0,0.5 Z "/>
           </dxm:MapLineCap.Geometry>
       </dxm:MapLineCap>
   </dxm:MapPolyline.EndLineCap>
</dxm:MapPolyline>
See Also