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
Namespace: Syncfusion.Blazor.Maps
Assembly: Syncfusion.Blazor.dll
Syntax
public class MapsPolygon : OwningComponentBase
Constructors
MapsPolygon()
Declaration
public MapsPolygon()
Properties
BorderColor
Gets or sets the color to be used in the polygon shape's border.
Declaration
public string BorderColor { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value representing a color. |
Remarks
You can change the color of the polygon shape's border using this property.
BorderOpacity
Gets or sets the opacity of the polygon shape's border.
Declaration
public double BorderOpacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts a double value ranging from 0 to 1 to represent opacity. |
Remarks
You can change the opacity of the polygon shape's border using this property.
BorderWidth
Gets or sets the width of the polygon shape's border.
Declaration
public double BorderWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts the double value representing the border width. |
Remarks
You can change the polygon shape's border width using this property.
ChildContent
Sets and gets the content of the UI element.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.RenderFragment |
Fill
Gets or sets the color that will be used to fill the polygon shape.
Declaration
public string Fill { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value representing a color. |
Remarks
You can change the color inside the polygon shape with this property.
Opacity
Gets or sets the opacity of the polygon shape.
Declaration
public double Opacity { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Accepts a double value ranging from 0 to 1 to represent opacity. |
Remarks
You can change the opacity of the polygon shape using this property.
Points
Gets or sets definition of the points that make up the polygon shape. The Maps component includes a polygon shape element that can be displayed over a geometry map or an online map.
Declaration
public IEnumerable<Coordinate> Points { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Coordinate> | A collection of points that define the polygon shape. |
Remarks
You can set a Coordinate collection that contains the polygon shape's latitude and longitude values.
ShapeType
Specifies the type of shape, such as polygon or line string, to be rendered on the maps.
Declaration
public PolygonShapeType ShapeType { get; set; }
Property Value
Type | Description |
---|---|
PolygonShapeType | Accepts the enum value. |
Remarks
This property defines the shape of the polygon to be rendered on the map layer, which can be either a polygon or a line.
TooltipTemplate
Specifies any HTML content as a custom tooltip for the polygon shape. If it is 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> | Accepts the user-defined HTML content that displays as a tooltip. |
Remarks
This property is used to define the template content, such as text, table, images, and other HTML elements, to be displayed as custom tooltips for the polygon shape.
TooltipText
Specifies the text to be displayed in the tooltip for the appropriate polygon shape. If it is not set, the tooltip will not be displayed.
Declaration
public string TooltipText { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts the string value, which displays as a tooltip. |
Remarks
This property is used to define the text content to be displayed as a tooltip for 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. |