alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class MapsPolygon

    Gets or sets the properties to define the polygon shape in the Maps component. The Maps component includes a polygon shape element that can be displayed over a geometry map or an online map.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    MapsPolygon
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.Maps
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MapsPolygon : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

    Constructors

    MapsPolygon()

    Declaration
    public MapsPolygon()

    Properties

    BorderColor

    Gets or sets the border color of the polygon shape.

    Declaration
    [Parameter]
    public string BorderColor { get; set; }
    Property Value
    Type Description
    string

    A string value that specifies the border color.

    Remarks

    This property alters the color of the polygon's outline.

    BorderOpacity

    Gets or sets the opacity of the polygon shape's border.

    Declaration
    [Parameter]
    public double BorderOpacity { get; set; }
    Property Value
    Type Description
    double

    A double value ranging from 0 to 1 that specifies the opacity level.

    Remarks

    This property controls the transparency of the polygon's outline.

    BorderWidth

    Gets or sets the border width of the polygon shape.

    Declaration
    [Parameter]
    public double BorderWidth { get; set; }
    Property Value
    Type Description
    double

    A double value that defines the thickness of the polygon's border.

    Remarks

    Adjust this property to modify the thickness of the border.

    ChildContent

    Sets and gets the content of the UI element.

    Declaration
    [Parameter]
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    RenderFragment

    A RenderFragment that represents the user interface content to be rendered inside this component.

    Remarks

    This property allows you to inject custom content within the polygon element in the map.

    Fill

    Gets or sets the fill color of the polygon shape.

    Declaration
    [Parameter]
    public string Fill { get; set; }
    Property Value
    Type Description
    string

    A string value that specifies the fill color.

    Remarks

    Use this property to change the interior color of the polygon shape.

    Opacity

    Gets or sets the opacity of the polygon shape.

    Declaration
    [Parameter]
    public double Opacity { get; set; }
    Property Value
    Type Description
    double

    A double value ranging from 0 to 1 that specifies the opacity level.

    Remarks

    Use this property to adjust how transparent the polygon shape should appear.

    Points

    Gets or sets the coordinates that define the polygon shape. The polygon is displayed over a map surface.

    Declaration
    [Parameter]
    public IEnumerable<Coordinate> Points { get; set; }
    Property Value
    Type Description
    IEnumerable<Coordinate>

    A collection of Coordinate objects that define the vertices of the polygon shape.

    Remarks

    This defines the geographical bounds of the polygon using latitude and longitude coordinates.

    ShapeType

    Specifies the shape type, such as polygon or line string, to be rendered on the maps.

    Declaration
    [Parameter]
    public PolygonShapeType ShapeType { get; set; }
    Property Value
    Type Description
    PolygonShapeType

    An enum value of type PolygonShapeType.

    Remarks

    This property determines the type of shape that the component will display on the map layer.

    TooltipTemplate

    Allows specifying HTML content as a custom tooltip for the polygon shape. If not set, the built-in tooltip will not be displayed.

    Declaration
    [Parameter]
    public RenderFragment<object> TooltipTemplate { get; set; }
    Property Value
    Type Description
    RenderFragment<object>

    A RenderFragment that serves as a template for the tooltip content.

    Remarks

    Use this property to customize the tooltip with HTML elements like text, images, or tables.

    TooltipText

    Specifies the text for the tooltip when hovering over the polygon shape. If not set, no tooltip will be displayed.

    Declaration
    [Parameter]
    public string TooltipText { get; set; }
    Property Value
    Type Description
    string

    A string value representing the tooltip text.

    Remarks

    Define the tooltip content to provide additional information about the polygon shape.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    ComponentBase.BuildRenderTree(RenderTreeBuilder)

    Dispose(bool)

    Disposes the property values during the destroy of the component that is hold up for the execution of the component.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    OwningComponentBase.Dispose(bool)

    OnInitializedAsync()

    OnInitializedAsync method is called when the component has received its initial parameters.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    Task representing the asynchronous operation.

    Overrides
    ComponentBase.OnInitializedAsync()

    OnParametersSetAsync()

    OnParametersSetAsync is a lifecycle method that is invoked when the component has received parameters, and the incoming values have been assigned to the properties.

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type Description
    Task

    Task representing the asynchronous operation.

    Overrides
    ComponentBase.OnParametersSetAsync()

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved