menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MapsLayer<TValue> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class MapsLayer<TValue>

    Gets or sets the layer customization for the maps control.

    Inheritance
    System.Object
    SfBaseComponent
    SfDataBoundComponent
    MapsLayer<TValue>
    Implements
    ILayer
    Inherited Members
    SfBaseComponent.Dispose()
    SfDataBoundComponent.DataManager
    SfDataBoundComponent.MainParent
    SfDataBoundComponent.OnAfterRenderAsync(Boolean)
    SfDataBoundComponent.SetDataManager<T>(Object)
    Namespace: Syncfusion.Blazor.Maps
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class MapsLayer<TValue> : SfDataBoundComponent, ILayer
    Type Parameters
    Name Description
    TValue

    represents the class name of the datasource.

    Constructors

    MapsLayer()

    Declaration
    public MapsLayer()

    Properties

    AnimationDuration

    Gets or sets the duration for the animation of layers in maps.

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

    A double value representing the duration of the animation in milliseconds.

    Remarks

    This property controls how long the animation effect will last when layers are animated.

    ChildContent

    Gets or sets the content of the UI element.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    The child content for rendering inside the component.

    Remarks

    This property allows you to define custom content that will be displayed within the layer.

    DataSource

    Gets or sets the data source for the layer. The data source can contain data that can be bound to the tooltip, marker, and bubble.

    Declaration
    public IEnumerable<object> DataSource { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Object>

    An System.Collections.Generic.IEnumerable<> representing the data bound to the tooltip, marker, or bubble.

    Remarks

    Use this property to bind any enumerable data source to the layer, enabling data-driven visualizations.

    GeometryType

    Gets or sets the geometry type for the layer in maps.

    Declaration
    public GeometryType GeometryType { get; set; }
    Property Value
    Type Description
    GeometryType

    A GeometryType enum value that specifies the type of geometry for the layer.

    Remarks

    This property defines the spatial data format, like Geographic or Cartesian, used by the layer.

    Query

    Gets or sets the query to select particular data from the shape data. This property is applicable only when the data source is created by data manager.

    Declaration
    public Query Query { get; set; }
    Property Value
    Type Description
    Query

    A Query object used to filter the shape data.

    Remarks

    This property is optional and only applicable when the data source is managed via a Data Manager.

    ShapeData

    Gets or sets the shape data for the maps to render.

    Declaration
    public object ShapeData { get; set; }
    Property Value
    Type Description
    System.Object

    An object representing the geographic shape data used for rendering the layer.

    Remarks

    The shape data can include various geographical boundaries for visualization on the map.

    ShapeDataPath

    Gets or sets the path for the shape from the shape data in maps.

    Declaration
    public string ShapeDataPath { get; set; }
    Property Value
    Type Description
    System.String

    A string representing the mapping path for shapes in the data.

    Remarks

    Set this property to specify how the shape data corresponds to your dataset.

    ShapePropertyPath

    Gets or sets the path for the layers from the layer data source in maps.

    Declaration
    public string[] ShapePropertyPath { get; set; }
    Property Value
    Type Description
    System.String[]

    A string array specifying the property path used to fetch data for layers.

    Remarks

    Use this property to extract and bind specific data fields from the layer dataset.

    Type

    Gets or sets the type of the layer in maps.

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

    A Type enum indicating the specific layer type like Layer or SubLayer.

    Remarks

    This property helps distinguish between different layer formats within the map.

    UrlTemplate

    Gets or sets the template for the map using the URL.

    Declaration
    public string UrlTemplate { get; set; }
    Property Value
    Type Description
    System.String

    A string template that specifies a URL for loading the map layer.

    Remarks

    This property is useful for rendering tile layers sourced from online map services.

    Visible

    Gets or sets a value indicating whether or not to display the layers of maps.

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    A boolean value that controls the visibility of the map layers.

    Remarks

    Set this property to false to hide the layer from view without affecting other layers.

    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
    Overrides
    SfBaseComponent.Dispose(Boolean)

    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.

    Overrides
    SfDataBoundComponent.OnInitializedAsync()

    OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)

    INotifyCollectionChanged event handler to track the changes in the layer data source.

    Declaration
    protected override void OnObservableChange(string propertyName, object sender, bool isCollectionChanged = false, NotifyCollectionChangedEventArgs e = null)
    Parameters
    Type Name Description
    System.String propertyName

    Observable property name.

    System.Object sender

    Observable model object.

    System.Boolean isCollectionChanged

    Sets true if the observable collection changed.

    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    Changed Event Args

    Overrides
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)

    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.

    Overrides
    SfDataBoundComponent.OnParametersSetAsync()

    Implements

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