menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MapsPolygon - Blazor API Reference | Syncfusion

    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
    System.Object
    MapsPolygon
    Namespace: Syncfusion.Blazor.Maps
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MapsPolygon : OwningComponentBase

    Constructors

    MapsPolygon()

    Declaration
    public MapsPolygon()

    Properties

    BorderColor

    Gets or sets the border color of the polygon shape.

    Declaration
    public string BorderColor { get; set; }
    Property Value
    Type Description
    System.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
    public double BorderOpacity { get; set; }
    Property Value
    Type Description
    System.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
    public double BorderWidth { get; set; }
    Property Value
    Type Description
    System.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
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    A Microsoft.AspNetCore.Components.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
    public string Fill { get; set; }
    Property Value
    Type Description
    System.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
    public double Opacity { get; set; }
    Property Value
    Type Description
    System.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
    public IEnumerable<Coordinate> Points { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.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
    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
    public RenderFragment<object> TooltipTemplate { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment<System.Object>

    A Microsoft.AspNetCore.Components.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
    public string TooltipText { get; set; }
    Property Value
    Type Description
    System.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
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    Dispose(Boolean)

    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
    System.Boolean disposing

    OnInitializedAsync()

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

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task representing the asynchronous operation.

    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
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task representing the asynchronous operation.

    Back to top Generated by DocFX
    OSZAR »
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved
    OSZAR »