dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components

MeasurementViewModel Class

Provides the logic for the Measurement widget.
ArcGIS Maps SDK for JavaScript

public class MeasurementViewModel : dymaptic.GeoBlazor.Core.Components.MapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IViewModel

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 MeasurementViewModel

Implements IViewModel

Constructors

MeasurementViewModel() Constructor

Parameterless constructor for use as a Razor Component.

public MeasurementViewModel();

MeasurementViewModel(Nullable, Nullable, Nullable) Constructor

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

public MeasurementViewModel(System.Nullable<dymaptic.GeoBlazor.Core.Enums.ActiveTool> activeTool=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrAreaUnit> areaUnit=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit> linearUnit=null);

Parameters

activeTool System.Nullable<ActiveTool>

Specifies the current measurement tool to display.
default null
ArcGIS Maps SDK for JavaScript

areaUnit System.Nullable<SystemOrAreaUnit>

Unit system (imperial, metric) or specific unit used for displaying the area values.
ArcGIS Maps SDK for JavaScript

linearUnit System.Nullable<SystemOrLengthUnit>

Unit system (imperial, metric) or specific unit used for displaying the distance values.
ArcGIS Maps SDK for JavaScript

Properties

MeasurementViewModel.ActiveTool Property

Specifies the current measurement tool to display.
default null
ArcGIS Maps SDK for JavaScript

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

Property Value

System.Nullable<ActiveTool>

MeasurementViewModel.ActiveViewModel Property

View model of the active measurement widget.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Interfaces.IMeasurementViewModelActiveViewModel? ActiveViewModel { get; set; }

Property Value

IMeasurementViewModelActiveViewModel

MeasurementViewModel.AreaUnit Property

Unit system (imperial, metric) or specific unit used for displaying the area values.
ArcGIS Maps SDK for JavaScript

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrAreaUnit> AreaUnit { get; set; }

Property Value

System.Nullable<SystemOrAreaUnit>

MeasurementViewModel.LinearUnit Property

Unit system (imperial, metric) or specific unit used for displaying the distance values.
ArcGIS Maps SDK for JavaScript

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit> LinearUnit { get; set; }

Property Value

System.Nullable<SystemOrLengthUnit>

MeasurementViewModel.State Property

The ViewModel’s state.
default “disabled”
ArcGIS Maps SDK for JavaScript

public System.Nullable<dymaptic.GeoBlazor.Core.Enums.MeasurementViewModelState> State { get; set; }

Property Value

System.Nullable<MeasurementViewModelState>

Methods

MeasurementViewModel.GetActiveTool() Method

Asynchronously retrieve the current value of the ActiveTool property.

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

Returns

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

MeasurementViewModel.GetActiveViewModel() Method

Asynchronously retrieve the current value of the ActiveViewModel property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Interfaces.IMeasurementViewModelActiveViewModel?> GetActiveViewModel();

Returns

System.Threading.Tasks.Task<IMeasurementViewModelActiveViewModel>

MeasurementViewModel.GetAreaUnit() Method

Asynchronously retrieve the current value of the AreaUnit property.

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

Returns

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

MeasurementViewModel.GetLinearUnit() Method

Asynchronously retrieve the current value of the LinearUnit property.

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

Returns

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

MeasurementViewModel.GetState() Method

Asynchronously retrieve the current value of the State property.

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

Returns

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

MeasurementViewModel.SetActiveTool(Nullable) Method

Asynchronously set the value of the ActiveTool property after render.

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

Parameters

value System.Nullable<ActiveTool>

The value to set.

Returns

System.Threading.Tasks.Task

MeasurementViewModel.SetAreaUnit(Nullable) Method

Asynchronously set the value of the AreaUnit property after render.

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

Parameters

value System.Nullable<SystemOrAreaUnit>

The value to set.

Returns

System.Threading.Tasks.Task

MeasurementViewModel.SetLinearUnit(Nullable) Method

Asynchronously set the value of the LinearUnit property after render.

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

Parameters

value System.Nullable<SystemOrLengthUnit>

The value to set.

Returns

System.Threading.Tasks.Task