dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Widgets

ScaleBarWidget Class

The ScaleBar widget displays a scale bar on the map or in a specified HTML node.
ArcGIS Maps SDK for JavaScript

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

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

Constructors

ScaleBarWidget() Constructor

Parameterless constructor for use as a Razor Component.

public ScaleBarWidget();

ScaleBarWidget(string, string, string, MapView, Nullable, Nullable, Nullable, ScaleBarViewModel, Nullable, string) Constructor

Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.

public ScaleBarWidget(string? containerId=null, string? icon=null, string? label=null, dymaptic.GeoBlazor.Core.Components.Views.MapView? mapView=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition> position=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleBarWidgetStyle> style=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleUnit> unit=null, dymaptic.GeoBlazor.Core.Components.ScaleBarViewModel? viewModel=null, System.Nullable<bool> visible=null, string? widgetId=null);

Parameters

containerId System.String

The id of an external HTML Element (div). If provided, the widget will be placed inside that element, instead of on the map.

icon System.String

Icon which represents the widget.
default “actual-size”
ArcGIS Maps SDK for JavaScript

label System.String

The widget’s default label.
ArcGIS Maps SDK for JavaScript

mapView MapView

If the Widget is defined outside of the MapView, this link is required to connect them together.

position System.Nullable<OverlayPosition>

The position of the widget in relation to the map view.

style System.Nullable<ScaleBarWidgetStyle>

The style for the scale bar.
default “line”
ArcGIS Maps SDK for JavaScript

unit System.Nullable<ScaleUnit>

Units to use for the scale bar.
ArcGIS Maps SDK for JavaScript

viewModel ScaleBarViewModel

The view model for this widget.
ArcGIS Maps SDK for JavaScript

visible System.Nullable<System.Boolean>

Indicates whether the widget is visible.
default true
ArcGIS Maps SDK for JavaScript

widgetId System.String

The unique ID assigned to the widget when the widget is created.
ArcGIS Maps SDK for JavaScript

Properties

ScaleBarWidget.Style Property

The style for the scale bar.
default “line”
ArcGIS Maps SDK for JavaScript

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleBarWidgetStyle> Style { get; set; }

Property Value

System.Nullable<ScaleBarWidgetStyle>

ScaleBarWidget.Type Property

The type of widget

public override dymaptic.GeoBlazor.Core.Enums.WidgetType Type { get; }

Property Value

WidgetType

ScaleBarWidget.Unit Property

Units to use for the scale bar

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleUnit> Unit { get; set; }

Property Value

System.Nullable<ScaleUnit>

ScaleBarWidget.ViewModel Property

The view model for this widget.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Components.ScaleBarViewModel? ViewModel { get; set; }

Property Value

ScaleBarViewModel

Methods

ScaleBarWidget.GetStyle() Method

Asynchronously retrieve the current value of the Style property.

public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleBarWidgetStyle>> GetStyle();

Returns

System.Threading.Tasks.Task<System.Nullable<ScaleBarWidgetStyle>>

ScaleBarWidget.GetUnit() Method

Asynchronously retrieve the current value of the Unit property.

public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleUnit>> GetUnit();

Returns

System.Threading.Tasks.Task<System.Nullable<ScaleUnit>>

ScaleBarWidget.GetViewModel() Method

Asynchronously retrieve the current value of the ViewModel property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.ScaleBarViewModel?> GetViewModel();

Returns

System.Threading.Tasks.Task<ScaleBarViewModel>

ScaleBarWidget.SetStyle(Nullable) Method

Asynchronously set the value of the Style property after render.

public System.Threading.Tasks.Task SetStyle(System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleBarWidgetStyle> value);

Parameters

value System.Nullable<ScaleBarWidgetStyle>

The value to set.

Returns

System.Threading.Tasks.Task

ScaleBarWidget.SetUnit(Nullable) Method

Asynchronously set the value of the Unit property after render.

public System.Threading.Tasks.Task SetUnit(System.Nullable<dymaptic.GeoBlazor.Core.Enums.ScaleUnit> value);

Parameters

value System.Nullable<ScaleUnit>

The value to set.

Returns

System.Threading.Tasks.Task

ScaleBarWidget.SetViewModel(ScaleBarViewModel) Method

Asynchronously set the value of the ViewModel property after render.

public System.Threading.Tasks.Task SetViewModel(dymaptic.GeoBlazor.Core.Components.ScaleBarViewModel? value);

Parameters

value ScaleBarViewModel

The value to set.

Returns

System.Threading.Tasks.Task

ScaleBarWidget.ValidateRequiredGeneratedChildren() Method

Validates source-generated child components.

public override void ValidateRequiredGeneratedChildren();

Implements ValidateRequiredGeneratedChildren()