dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Widgets

MeasurementWidget Class

The Measurement widget groups and manages multiple measurement tools and allows you to easily switch between them using
the activeTool property.
ArcGIS Maps SDK for JavaScript

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

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

Constructors

MeasurementWidget() Constructor

Parameterless constructor for use as a Razor Component.

public MeasurementWidget();

MeasurementWidget(Nullable, Nullable, string, string, string, Nullable, MapView, Nullable, MeasurementViewModel, 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 MeasurementWidget(System.Nullable<dymaptic.GeoBlazor.Core.Enums.ActiveTool> activeTool=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrAreaUnit> areaUnit=null, string? containerId=null, string? icon=null, string? label=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit> linearUnit=null, dymaptic.GeoBlazor.Core.Components.Views.MapView? mapView=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition> position=null, dymaptic.GeoBlazor.Core.Components.MeasurementViewModel? viewModel=null, System.Nullable<bool> visible=null, string? widgetId=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

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 “measure”
ArcGIS Maps SDK for JavaScript

label System.String

The widget’s default label.
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

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.

viewModel MeasurementViewModel

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

MeasurementWidget.ActiveTool Property

Specifies the current measurement tool to display.

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

Property Value

System.Nullable<ActiveTool>

MeasurementWidget.ActiveWidget Property

The measurement widget that is currently being used.
default null
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Interfaces.IMeasurementWidgetActiveWidget? ActiveWidget { get; set; }

Property Value

IMeasurementWidgetActiveWidget

MeasurementWidget.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>

MeasurementWidget.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>

MeasurementWidget.Type Property

The type of widget

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

Property Value

WidgetType

MeasurementWidget.ViewModel Property

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

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

Property Value

MeasurementViewModel

Methods

MeasurementWidget.Clear() Method

Removes all measurement widgets and associated graphics.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task Clear();

Returns

System.Threading.Tasks.Task

MeasurementWidget.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>>

MeasurementWidget.GetActiveWidget() Method

Asynchronously retrieve the current value of the ActiveWidget property.

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

Returns

System.Threading.Tasks.Task<IMeasurementWidgetActiveWidget>

MeasurementWidget.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>>

MeasurementWidget.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>>

MeasurementWidget.GetViewModel() Method

Asynchronously retrieve the current value of the ViewModel property.

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

Returns

System.Threading.Tasks.Task<MeasurementViewModel>

MeasurementWidget.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

MeasurementWidget.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

MeasurementWidget.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

MeasurementWidget.SetViewModel(MeasurementViewModel) Method

Asynchronously set the value of the ViewModel property after render.

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

Parameters

value MeasurementViewModel

The value to set.

Returns

System.Threading.Tasks.Task

MeasurementWidget.StartMeasurement() Method

Starts a new measurement for the active measurement widget.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task StartMeasurement();

Returns

System.Threading.Tasks.Task

MeasurementWidget.ValidateRequiredGeneratedChildren() Method

Validates source-generated child components.

public override void ValidateRequiredGeneratedChildren();

Implements ValidateRequiredGeneratedChildren()