dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Widgets
Widget Class
The base class for widgets. Each widget’s presentation is separate from its properties, methods, and data.
ArcGIS Maps SDK for JavaScript
public abstract class Widget : dymaptic.GeoBlazor.Core.Components.MapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Widget
Derived
↳ AreaMeasurement2DWidget
↳ BasemapGalleryWidget
↳ BasemapLayerListWidget
↳ BasemapToggleWidget
↳ BookmarksWidget
↳ CompassWidget
↳ DistanceMeasurement2DWidget
↳ ExpandWidget
↳ HomeWidget
↳ LayerListWidget
↳ LegendWidget
↳ ListItemPanelWidget
↳ LocateWidget
↳ MeasurementWidget
↳ PopupWidget
↳ ScaleBarWidget
↳ SearchWidget
↳ SliderWidget
↳ ZoomWidget
Properties
Widget.ContainerId Property
The id of an external HTML Element (div). If provided, the widget will be placed inside that element, instead of on the map.
public string? ContainerId { get; set; }
Property Value
Widget.Icon Property
Icon which represents the widget. It is typically used when the widget is controlled by another one (e.g. in the Expand widget).
Default Value:null
public string? Icon { get; set; }
Property Value
Widget.Label Property
The widget’s label.
public virtual string? Label { get; set; }
Property Value
Widget.MapView Property
If the Widget is defined outside of the MapView, this link is required to connect them together.
public dymaptic.GeoBlazor.Core.Components.Views.MapView? MapView { get; set; }
Property Value
Widget.OnWidgetCreated Property
Event handler to know when the widget has been created.
public Microsoft.AspNetCore.Components.EventCallback OnWidgetCreated { get; set; }
Property Value
Microsoft.AspNetCore.Components.EventCallback
Widget.Position Property
The position of the widget in relation to the map view.
public System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition> Position { get; set; }
Property Value
System.Nullable<OverlayPosition>
Remarks
Either Position or ContainerId should be set, but not both.
Widget.Type Property
The type of widget
public abstract dymaptic.GeoBlazor.Core.Enums.WidgetType Type { get; }
Property Value
Widget.WidgetId Property
The unique ID assigned to the widget when the widget is created. If not set by the developer, it will default to the container ID, or if that is not present then it will be automatically generated.
public string? WidgetId { get; set; }
Property Value
Methods
Widget.GetContainerId() Method
Asynchronously retrieve the current value of the ContainerId property.
public System.Threading.Tasks.Task<string?> GetContainerId();
Returns
System.Threading.Tasks.Task<System.String>
Widget.GetIcon() Method
Asynchronously retrieve the current value of the Icon property.
public System.Threading.Tasks.Task<string?> GetIcon();
Returns
System.Threading.Tasks.Task<System.String>
Widget.GetLabel() Method
Asynchronously retrieve the current value of the Label property.
public System.Threading.Tasks.Task<string?> GetLabel();
Returns
System.Threading.Tasks.Task<System.String>
Widget.GetPosition() Method
Asynchronously retrieve the current value of the Position property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition>> GetPosition();
Returns
System.Threading.Tasks.Task<System.Nullable<OverlayPosition>>
Widget.GetWidgetId() Method
Asynchronously retrieve the current value of the WidgetId property.
public System.Threading.Tasks.Task<string?> GetWidgetId();
Returns
System.Threading.Tasks.Task<System.String>
Widget.OnJsComponentCreated(IJSObjectReference, IJSStreamReference) Method
For internal use, registration from JavaScript.
public override System.Threading.Tasks.ValueTask<dymaptic.GeoBlazor.Core.Components.MapComponent?> OnJsComponentCreated(Microsoft.JSInterop.IJSObjectReference jsComponentReference, Microsoft.JSInterop.IJSStreamReference jsonStreamReference);
Parameters
jsComponentReference
Microsoft.JSInterop.IJSObjectReference
jsonStreamReference
Microsoft.JSInterop.IJSStreamReference
Returns
System.Threading.Tasks.ValueTask<MapComponent>
Widget.SetContainerId(string) Method
Asynchronously set the value of the ContainerId property after render.
public System.Threading.Tasks.Task SetContainerId(string? containerId);
Parameters
containerId
System.String
Returns
Widget.SetIcon(string) Method
Asynchronously set the value of the Icon property after render.
public System.Threading.Tasks.Task SetIcon(string? icon);
Parameters
icon
System.String
Returns
Widget.SetLabel(string) Method
Asynchronously set the value of the Label property after render.
public System.Threading.Tasks.Task SetLabel(string? label);
Parameters
label
System.String
Returns
Widget.SetParametersAsync(ParameterView) Method
Sets parameters supplied by the component’s parent in the render tree.
public override System.Threading.Tasks.Task SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView parameters);
Parameters
parameters
Microsoft.AspNetCore.Components.ParameterView
The parameters.
Implements SetParametersAsync(ParameterView)
Returns
System.Threading.Tasks.Task
A System.Threading.Tasks.Task that completes when the component has finished updating and rendering itself.
Remarks
Parameters are passed when Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView) is called. It is not required that
the caller supply a parameter value for all of the parameters that are logically understood by the component.
The default implementation of Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync(Microsoft.AspNetCore.Components.ParameterView) will set the value of each property
decorated with Microsoft.AspNetCore.Components.ParameterAttribute or Microsoft.AspNetCore.Components.CascadingParameterAttribute that has
a corresponding value in the Microsoft.AspNetCore.Components.ParameterView. Parameters that do not have a corresponding value
will be unchanged.
Widget.SetPosition(Nullable) Method
Asynchronously set the value of the Position property after render.
public System.Threading.Tasks.Task SetPosition(System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition> position);
Parameters
position
System.Nullable<OverlayPosition>
Returns
Widget.SetWidgetId(string) Method
Asynchronously set the value of the WidgetId property after render.
public System.Threading.Tasks.Task SetWidgetId(string? widgetId);
Parameters
widgetId
System.String