Skip to main content
All docs
V25.1
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    MapLineCap.Template Property

    Specifies a template for the map line cap.

    Namespace: DevExpress.XtraMap

    Assembly: DevExpress.XtraMap.v25.1.dll

    NuGet Package: DevExpress.Win.Map

    #Declaration

    [DefaultValue(null)]
    public MapUnit[] Template { get; set; }

    #Property Value

    Type Default Description
    MapUnit[] null

    A MapUnit array that defines the map line cap template.

    #Remarks

    If the Template property is not set and the Visible property is set to true, the Map Control displays an arrow (the default map line cap).

    #Example

    The following example specifies the end cap template and shows the default arrow for the MapLine start cap:

    MapLineCap

    MapLine line = new MapLine() { Point1 = new GeoPoint(0, 0), 
                                   Point2 = new GeoPoint(-10, -30), 
                                   StrokeWidth = 2, 
                                   Stroke = System.Drawing.Color.Blue };
    line.StartLineCap.Visible = true;
    line.StartLineCap.Length = 20;
    line.StartLineCap.Width = 10;
    
    line.EndLineCap.Visible = true;
    line.EndLineCap.Template = new MapUnit[] {
       new MapUnit(-0.5, 0),
       new MapUnit(0, 0.5),
       new MapUnit(0.5, 0),
       new MapUnit(0, -0.5),
    };
    line.EndLineCap.Length = 10;
    line.EndLineCap.Width = 10;
    
    mapItemStorage1.Items.Add(line);
    
    See Also