layout: default title: LayerListWidget parent: Core Classes —

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Widgets

LayerListWidget Class

The LayerList widget provides a way to display a list of layers, and switch on/off their visibility. The ListItem
API provides access to each layer’s properties, allows the developer to configure actions related to the layer, and
allows the developer to add content to the item related to the layer.
ArcGIS Maps SDK for JavaScript

public class LayerListWidget : dymaptic.GeoBlazor.Core.Components.Widgets.Widget

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Widget 🡒 LayerListWidget

Properties

LayerListWidget.HasCustomHandler Property

A convenience property that signifies whether a custom OnListItemCreatedHandler was registered.

public bool HasCustomHandler { get; }

Property Value

System.Boolean

LayerListWidget.Label Property

The widget’s default label.

public string? Label { get; set; }

Property Value

System.String

LayerListWidget.LayerListWidgetObjectReference Property

The .Net object reference to this class for calling from JavaScript.

public Microsoft.JSInterop.DotNetObjectReference<dymaptic.GeoBlazor.Core.Components.Widgets.LayerListWidget> LayerListWidgetObjectReference { get; }

Property Value

Microsoft.JSInterop.DotNetObjectReference<LayerListWidget>

LayerListWidget.OnListItemCreatedHandler Property

A delegate to implement a custom handler for setting up each ListItem.
Function must take in a ListItem and return a Task with the same (updated) item.

public System.Func<dymaptic.GeoBlazor.Core.Components.Widgets.ListItem,System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Widgets.ListItem>>? OnListItemCreatedHandler { get; set; }

Property Value

System.Func<ListItem,System.Threading.Tasks.Task<ListItem>>

LayerListWidget.WidgetType Property

The type of widget

public override string WidgetType { get; }

Property Value

System.String

Methods

LayerListWidget.OnListItemCreated(ListItem) Method

A JavaScript invokable method that is triggered whenever a ListItem is created and a handler is attached.

public System.Threading.Tasks.Task<object?> OnListItemCreated(dymaptic.GeoBlazor.Core.Components.Widgets.ListItem item);

Parameters

item ListItem

The ListItem from the original source.

Returns

System.Threading.Tasks.Task<System.Object>
Returns the modified ListItem