dymaptic.GeoBlazor.Core

dymaptic.GeoBlazor.Core.Components.Widgets

MeasurementWidget Class

<a target=”_blank” href=”https://docs.geoblazor.com/pages/classes/dymaptic.GeoBlazor.Core.Components.Widgets.MeasurementWidget.html”>GeoBlazor Docs</a> The Measurement widget groups and manages multiple measurement tools and allows you to easily switch between them using the <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#activeTool”>activeTool</a> property. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html”>ArcGIS Maps SDK for JavaScript</a>

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<ActiveTool>, Nullable<SystemOrAreaUnit>, string, string, string, Nullable<SystemOrLengthUnit>, MapView, Nullable<OverlayPosition>, MeasurementViewModel, Nullable<bool>, 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 <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#activeTool”>ArcGIS Maps SDK for JavaScript</a>

areaUnit System.Nullable<SystemOrAreaUnit>

Unit system (imperial, metric) or specific unit used for displaying the area values. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#areaUnit”>ArcGIS Maps SDK for JavaScript</a>

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” <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#icon”>ArcGIS Maps SDK for JavaScript</a>

label System.String

The widget’s default label. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#label”>ArcGIS Maps SDK for JavaScript</a>

linearUnit System.Nullable<SystemOrLengthUnit>

Unit system (imperial, metric) or specific unit used for displaying the distance values. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#linearUnit”>ArcGIS Maps SDK for JavaScript</a>

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. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#viewModel”>ArcGIS Maps SDK for JavaScript</a>

visible System.Nullable<System.Boolean>

Indicates whether the widget is visible. default true <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#visible”>ArcGIS Maps SDK for JavaScript</a>

widgetId System.String

The unique ID assigned to the widget when the widget is created. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#id”>ArcGIS Maps SDK for JavaScript</a>

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

<a target=”_blank” href=”https://docs.geoblazor.com/pages/classes/dymaptic.GeoBlazor.Core.Components.Widgets.MeasurementWidget.html#measurementwidgetactivewidget-property”>GeoBlazor Docs</a> The measurement widget that is currently being used. default null <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#activeWidget”>ArcGIS Maps SDK for JavaScript</a>

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

Property Value

IMeasurementWidgetActiveWidget

MeasurementWidget.AreaUnit Property

<a target=”_blank” href=”https://docs.geoblazor.com/pages/classes/dymaptic.GeoBlazor.Core.Components.Widgets.MeasurementWidget.html#measurementwidgetareaunit-property”>GeoBlazor Docs</a> Unit system (imperial, metric) or specific unit used for displaying the area values. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#areaUnit”>ArcGIS Maps SDK for JavaScript</a>

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

Property Value

System.Nullable<SystemOrAreaUnit>

MeasurementWidget.LinearUnit Property

<a target=”_blank” href=”https://docs.geoblazor.com/pages/classes/dymaptic.GeoBlazor.Core.Components.Widgets.MeasurementWidget.html#measurementwidgetlinearunit-property”>GeoBlazor Docs</a> Unit system (imperial, metric) or specific unit used for displaying the distance values. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#linearUnit”>ArcGIS Maps SDK for JavaScript</a>

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

<a target=”_blank” href=”https://docs.geoblazor.com/pages/classes/dymaptic.GeoBlazor.Core.Components.Widgets.MeasurementWidget.html#measurementwidgetviewmodel-property”>GeoBlazor Docs</a> The view model for this widget. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#viewModel”>ArcGIS Maps SDK for JavaScript</a>

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

Property Value

MeasurementViewModel

Methods

MeasurementWidget.Clear() Method

<a target=”_blank” href=”https://docs.geoblazor.com/pages/classes/dymaptic.GeoBlazor.Core.Components.Widgets.MeasurementWidget.html#measurementwidgetclear-method”>GeoBlazor Docs</a> Removes all measurement widgets and associated graphics. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#clear”>ArcGIS Maps SDK for JavaScript</a>

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<ActiveTool>) 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<SystemOrAreaUnit>) 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<SystemOrLengthUnit>) 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

<a target=”_blank” href=”https://docs.geoblazor.com/pages/classes/dymaptic.GeoBlazor.Core.Components.Widgets.MeasurementWidget.html#measurementwidgetstartmeasurement-method”>GeoBlazor Docs</a> Starts a new measurement for the active measurement widget. <a target=”_blank” href=”https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html#startMeasurement”>ArcGIS Maps SDK for JavaScript</a>

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()