menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MapArc - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MapArc

    The MapArc represents the default model for arc layer.

    Inheritance
    System.Object
    MapArc
    Namespace: Syncfusion.Maui.Maps
    Assembly: Syncfusion.Maui.Maps.dll
    Syntax
    public class MapArc : Element, IThemeElement
    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc StrokeThickness="4"
                                            HeightFactor="0.4"
                                            ControlPointFactor="0.9"
                                            Stroke="Violet">
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                                    <map:MapArc.StrokeDashArray>
                                     <DoubleCollection>
                                          <x:Double>2</x:Double>
                                          <x:Double>2</x:Double>
                                          <x:Double>0.1</x:Double>
                                          <x:Double>2</x:Double>
                                    </DoubleCollection>
                                 </map:MapArc.StrokeDashArray>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    </map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944, 114.561183);
    arc.To = new MapLatLng(37.316207, 89.494558);
    arc.StrokeThickness = 4;
    arc.HeightFactor = 0.4;
    arc.ControlPointFactor = 0.9;
    arc.Stroke = Brush.Violet;
    arc.StrokeDashArray = new double[] { 2, 2, 0.1f, 2 };
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;

    Constructors

    MapArc()

    Initializes a new instance of the MapArc class.

    Declaration
    public MapArc()

    Fields

    ControlPointFactorProperty

    Identifies the ControlPointFactor bindable property.

    Declaration
    public static readonly BindableProperty ControlPointFactorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    FromProperty

    Identifies the From bindable property.

    Declaration
    public static readonly BindableProperty FromProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    HeightFactorProperty

    Identifies the HeightFactor bindable property.

    Declaration
    public static readonly BindableProperty HeightFactorProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StrokeDashArrayProperty

    Identifies the StrokeDashArray bindable property.

    Declaration
    public static readonly BindableProperty StrokeDashArrayProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StrokeProperty

    Identifies the Stroke bindable property.

    Declaration
    public static readonly BindableProperty StrokeProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    StrokeThicknessProperty

    Identifies the StrokeThickness bindable property.

    Declaration
    public static readonly BindableProperty StrokeThicknessProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    ToProperty

    Identifies the To bindable property.

    Declaration
    public static readonly BindableProperty ToProperty
    Field Value
    Type
    Microsoft.Maui.Controls.BindableProperty

    Properties

    ControlPointFactor

    Gets or sets the value that specifies arc bending position. The value ranges from 0 to 1.

    Declaration
    public double ControlPointFactor { get; set; }
    Property Value
    Type Description
    System.Double

    It specifies the control point factor of the map arc. The default value is 0.5.

    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc StrokeThickness="4"
                                            HeightFactor="0.4"
                                            ControlPointFactor="0.9">
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    </map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944, 114.561183);
    arc.To = new MapLatLng(37.316207, 89.494558);
    arc.StrokeThickness = 4;
    arc.HeightFactor = 0.4;
    arc.ControlPointFactor = 0.9;
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;

    From

    Gets or sets the value that specifies the start point of arc.

    Declaration
    public MapLatLng From { get; set; }
    Property Value
    Type Description
    MapLatLng

    The from value of the map arc. The default is null.

    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc>
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    <map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944 ,114.561183);
    arc.To = new MapLatLng(37.316207, 89.494558);
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;

    HeightFactor

    Gets or sets the value that specifies the distance from the line connecting two points to the arc bend point. The value ranges from -1 to 1.

    Declaration
    public double HeightFactor { get; set; }
    Property Value
    Type Description
    System.Double

    It specifies the height factor of the map arc. The default value is 0.2.

    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc StrokeThickness="4"
                                            HeightFactor="0.4">
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    </map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944, 114.561183);
    arc.To = new MapLatLng( 37.316207, 89.494558);
    arc.StrokeThickness = 4;
    arc.HeightFactor = 0.4;
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;

    Stroke

    Gets or sets the Brush that specifies how the arc to be painted.

    Declaration
    public Brush Stroke { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.Brush

    A Brush that specifies how the map arc is painted.

    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc StrokeThickness="4"
                                            HeightFactor="0.4"
                                            ControlPointFactor="0.9"
                                            Stroke="Violet">
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    </map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944, 114.561183);
    arc.To = new MapLatLng(37.316207, 89.494558);
    arc.StrokeThickness = 4;
    arc.HeightFactor = 0.4;
    arc.ControlPointFactor = 0.9;
    arc.Stroke = Brush.Violet;
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;

    StrokeDashArray

    Gets or sets the value collection of double values that specifies the pattern of dashes and gaps that are used to outline of the arc.

    Declaration
    public DoubleCollection StrokeDashArray { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.DoubleCollection

    The dash value of the map arc. The default is null.

    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc StrokeThickness="4"
                                            HeightFactor="0.4"
                                            ControlPointFactor="0.9"
                                            Stroke="Violet">
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                                    <map:MapArc.StrokeDashArray>
                                     <DoubleCollection>
                                          <x:Double>2</x:Double>
                                          <x:Double>2</x:Double>
                                          <x:Double>0.1</x:Double>
                                          <x:Double>2</x:Double>
                                    </DoubleCollection>
                                 </map:MapArc.StrokeDashArray>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    </map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944, 114.561183);
    arc.To = new MapLatLng( 37.316207, 89.494558);
    arc.StrokeThickness = 4;
    arc.HeightFactor = 0.4;
    arc.ControlPointFactor = 0.9;
    arc.Stroke = Brush.Violet;
    arc.StrokeDashArray = new double[] { 2, 2, 0.1f, 2 };
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;

    StrokeThickness

    Gets or sets the value that specifies the width of the arc.

    Declaration
    public double StrokeThickness { get; set; }
    Property Value
    Type Description
    System.Double

    It specifies the width of the map arc. The default value is 2.

    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc StrokeThickness="4">
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    </map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944, 114.561183);
    arc.To = new MapLatLng(37.316207, 89.494558);
    arc.StrokeThickness = 4;
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;

    To

    Gets or sets the value that specifies the end point of arc.

    Declaration
    public MapLatLng To { get; set; }
    Property Value
    Type Description
    MapLatLng

    The to value of the map arc. The default is null.

    Examples
    • XAML
    • C#
    <map:SfMaps>
        <map:SfMaps.Layer>
            <map:MapShapeLayer ShapesSource="https://cdn.syncfusion.com/maps/map-data/world-map.json">
                <map:MapShapeLayer.Sublayers>
                     <map:MapArcLayer>
                           <map:MapArcLayer.Arcs>
                                <map:MapArc>
                                    <map:MapArc.From>
                                        <map:MapLatLng Latitude="26.841944"
                                                       Longitude="114.561183" />
                                    </map:MapArc.From>
                                    <map:MapArc.To>
                                       <map:MapLatLng Latitude="37.316207"
                                                      Longitude="89.494558" />
                                    </map:MapArc.To>
                               </map:MapArc>
                         </map:MapArcLayer.Arcs>
                    <map:MapArcLayer>
                </map:MapShapeLayer.Sublayers>
            </map:MapShapeLayer>
        </map:SfMaps.Layer>
    </map:SfMaps>
    SfMaps maps = new SfMaps();
    MapShapeLayer layer = new MapShapeLayer();
    layer.ShapesSource = MapSource.FromUri(new Uri("https://cdn.syncfusion.com/maps/map-data/world-map.json"));
    MapArcLayer arcLayer = new MapArcLayer();
    MapArc arc = new MapArc();
    arc.From = new MapLatLng(26.841944, 114.561183);
    arc.To = new MapLatLng(37.316207, 89.494558);
    arcLayer.Arcs.Add(arc);
    layer.Sublayers.Add(arcLayer);
    maps.Layer = layer;
    this.Content = maps;
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved