Skip to main content Link Menu Expand (external link) Document Search Copy Copied

dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Widgets

BasemapToggleWidget Class

The BasemapToggle provides a widget which allows an end-user to switch between two basemaps. The toggled basemap is
set inside the view’s map object.

ArcGIS
  
JS API

</a>

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

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

Properties

BasemapToggleWidget.NextBasemap Property

The next Basemap for toggling.

public dymaptic.GeoBlazor.Core.Components.Basemap? NextBasemap { get; set; }

Property Value

Basemap

Remarks

Set either NextBasemapName or NextBasemap

BasemapToggleWidget.NextBasemapName Property

The name of the next basemap for toggling.

public string? NextBasemapName { get; set; }

Property Value

System.String

Remarks

Set either NextBasemapName or NextBasemap

BasemapToggleWidget.WidgetType Property

The type of widget

public override string WidgetType { get; }

Property Value

System.String

Methods

BasemapToggleWidget.RegisterChildComponent(MapComponent) Method

Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnAfterRenderAsync(System.Boolean) to “Register” the current component with it’s parent.

public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The calling, child component to register

Returns

System.Threading.Tasks.Task

Exceptions

InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.

BasemapToggleWidget.UnregisterChildComponent(MapComponent) Method

Undoes the “Registration” of a child with its parent.

public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child MapComponent

The child to unregister

Returns

System.Threading.Tasks.Task

BasemapToggleWidget.ValidateRequiredChildren() Method

When a MapView is prepared to render, this will check to make sure that all properties with the
RequiredPropertyAttribute are provided.

public override void ValidateRequiredChildren();

Exceptions

MissingRequiredChildElementException
The consumer needs to provide the missing child component

MissingRequiredOptionsChildElementException
The consumer needs to provide ONE of the options of child components