menu

MAUI

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

    Show / Hide Table of Contents

    Class MapCircle

    The MapCircle represents the default model for circle layer.

    Inheritance
    System.Object
    MapCircle
    Namespace: Syncfusion.Maui.Maps
    Assembly: Syncfusion.Maui.Maps.dll
    Syntax
    public class MapCircle : 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:MapCircleLayer>
                         <map:MapCircleLayer.Circles>
                             <map:MapCircle Radius ="10"
                                            Fill="LightGreen"
                                            Stroke="Green"
                                            StrokeThickness="4">
                                  <map:MapCircle.Center>
                                      <map:MapLatLng Latitude="26.841944"
                                                     Longitude="114.561183" />
                                  </map:MapCircle.Center>
                             </map:MapCircle>
                         </map:MapCircleLayer.Circles>
                     </map:MapCircleLayer>
                 </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"));
    MapCircleLayer circleLayer = new MapCircleLayer();
    MapCircle circle = new MapCircle();
    circle.Center = new MapLatLng(26.841944, 114.561183);
    circle.Radius = 10;
    circle.Fill = Brush.LightGreen;
    circle.Stroke = Brush.Green;
    circle.StrokeThickness = 4;
    circleLayer.Circles.Add(circle);
    layer.Sublayers.Add(circleLayer);
    maps.Layer = layer;
    this.Content = maps;

    Constructors

    MapCircle()

    Initializes a new instance of the MapCircle class.

    Declaration
    public MapCircle()

    Fields

    CenterProperty

    Identifies the Center bindable property.

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

    FillProperty

    Identifies the Fill bindable property.

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

    RadiusProperty

    Identifies the Radius bindable property.

    Declaration
    public static readonly BindableProperty RadiusProperty
    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

    Properties

    Center

    Gets or sets the value that specifies the center of the circle.

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

    The center value of the map circle. 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:MapCircleLayer>
                         <map:MapCircleLayer.Circles>
                             <map:MapCircle>
                                  <map:MapCircle.Center>
                                      <map:MapLatLng Latitude="26.841944"
                                                     Longitude="114.561183" />
                                  </map:MapCircle.Center>
                             </map:MapCircle>
                         </map:MapCircleLayer.Circles>
                     </map:MapCircleLayer>
                 </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"));
    MapCircleLayer circleLayer = new MapCircleLayer();
    MapCircle circle = new MapCircle();
    circle.Center = new MapLatLng(26.841944, 114.561183);
    circleLayer.Circles.Add(circle);
    layer.Sublayers.Add(circleLayer);
    maps.Layer = layer;
    this.Content = maps;

    Fill

    Gets or sets the brush that paints the interior area of the circle.

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

    A Brush that specifies how the map circle interior 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:MapCircleLayer>
                         <map:MapCircleLayer.Circles>
                             <map:MapCircle Radius ="10"
                                            Fill="LightGreen">
                                  <map:MapCircle.Center>
                                      <map:MapLatLng Latitude="26.841944"
                                                     Longitude="114.561183" />
                                  </map:MapCircle.Center>
                             </map:MapCircle>
                         </map:MapCircleLayer.Circles>
                     </map:MapCircleLayer>
                 </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"));
    MapCircleLayer circleLayer = new MapCircleLayer();
    MapCircle circle = new MapCircle();
    circle.Center = new MapLatLng(26.841944, 114.561183);
    circle.Radius = 10;
    circle.Fill = Brush.LightGreen;
    circleLayer.Circles.Add(circle);
    layer.Sublayers.Add(circleLayer);
    maps.Layer = layer;
    this.Content = maps;

    Radius

    Gets or sets the value that specifies the radius of the circle.

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

    It specifies the radius of the map circle. The default value is 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:MapCircleLayer>
                         <map:MapCircleLayer.Circles>
                             <map:MapCircle Radius ="10">
                                  <map:MapCircle.Center>
                                      <map:MapLatLng Latitude="26.841944"
                                                     Longitude="114.561183" />
                                  </map:MapCircle.Center>
                             </map:MapCircle>
                         </map:MapCircleLayer.Circles>
                     </map:MapCircleLayer>
                 </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"));
    MapCircleLayer circleLayer = new MapCircleLayer();
    MapCircle circle = new MapCircle();
    circle.Center = new MapLatLng(26.841944, 114.561183);
    circle.Radius = 10;
    circleLayer.Circles.Add(circle);
    layer.Sublayers.Add(circleLayer);
    maps.Layer = layer;
    this.Content = maps;

    Stroke

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

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

    A Brush that specifies how the circle outline 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:MapCircleLayer>
                         <map:MapCircleLayer.Circles>
                             <map:MapCircle Radius ="10"
                                            Fill="LightGreen"
                                            Stroke="Green">
                                  <map:MapCircle.Center>
                                      <map:MapLatLng Latitude="26.841944"
                                                     Longitude="114.561183" />
                                  </map:MapCircle.Center>
                             </map:MapCircle>
                         </map:MapCircleLayer.Circles>
                     </map:MapCircleLayer>
                 </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"));
    MapCircleLayer circleLayer = new MapCircleLayer();
    MapCircle circle = new MapCircle();
    circle.Center = new MapLatLng(26.841944, 114.561183);
    circle.Radius = 10;
    circle.Fill = Brush.LightGreen;
    circle.Stroke = Brush.Green;
    circleLayer.Circles.Add(circle);
    layer.Sublayers.Add(circleLayer);
    maps.Layer = layer;
    this.Content = maps;

    StrokeThickness

    Gets or sets the value that specifies the width of the circle stroke outline.

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

    It specifies the width of the circle stroke outline. 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:MapCircleLayer>
                         <map:MapCircleLayer.Circles>
                             <map:MapCircle Radius ="10"
                                            Fill="LightGreen"
                                            Stroke="Green"
                                            StrokeThickness="4">
                                  <map:MapCircle.Center>
                                      <map:MapLatLng Latitude="26.841944"
                                                     Longitude="114.561183" />
                                  </map:MapCircle.Center>
                             </map:MapCircle>
                         </map:MapCircleLayer.Circles>
                     </map:MapCircleLayer>
                 </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"));
    MapCircleLayer circleLayer = new MapCircleLayer();
    MapCircle circle = new MapCircle();
    circle.Center = new MapLatLng(26.841944, 114.561183);
    circle.Radius = 10;
    circle.Fill = Brush.LightGreen;
    circle.Stroke = Brush.Green;
    circle.StrokeThickness = 4;
    circleLayer.Circles.Add(circle);
    layer.Sublayers.Add(circleLayer);
    maps.Layer = layer;
    this.Content = maps;
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved