layout: default title: BasemapToggleWidget parent: Core Classes —
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 Maps SDK for JavaScript
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
Remarks
Set either NextBasemapName or NextBasemap
BasemapToggleWidget.NextBasemapName Property
The name of the next basemap for toggling.
public string? NextBasemapName { get; set; }
Property Value
Remarks
Set either NextBasemapName or NextBasemap
BasemapToggleWidget.NextBasemapStyle Property
The next BasemapStyleName for toggling.
public System.Nullable<dymaptic.GeoBlazor.Core.Components.BasemapStyleName> NextBasemapStyle { get; set; }
Property Value
System.Nullable<BasemapStyleName>
BasemapToggleWidget.WidgetType Property
The type of widget
public override string WidgetType { get; }
Property Value
Methods
BasemapToggleWidget.RegisterChildComponent(MapComponent) Method
Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync 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
Exceptions
InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.
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
Remarks
This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.