dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Widgets
DistanceMeasurement2DWidget Class
The DistanceMeasurement2D widget calculates and displays the distance between two or more points
in a MapView.
ArcGIS Maps SDK for JavaScript
public class DistanceMeasurement2DWidget : dymaptic.GeoBlazor.Core.Components.Widgets.Widget,
dymaptic.GeoBlazor.Core.Interfaces.IMeasurementWidgetActiveWidget,
dymaptic.GeoBlazor.Core.Interfaces.IMapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Widget 🡒 DistanceMeasurement2DWidget
Implements IMeasurementWidgetActiveWidget, IMapComponent
Constructors
DistanceMeasurement2DWidget() Constructor
Parameterless constructor for use as a Razor Component.
public DistanceMeasurement2DWidget();
DistanceMeasurement2DWidget(string, string, string, MapView, Nullable, SnappingOptions, Nullable, IReadOnlyList, DistanceMeasurement2DViewModel, 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 DistanceMeasurement2DWidget(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, dymaptic.GeoBlazor.Core.Components.SnappingOptions? snappingOptions=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit> unit=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit>? unitOptions=null, dymaptic.GeoBlazor.Core.Components.DistanceMeasurement2DViewModel? 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 “measure-line”
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.
snappingOptions
SnappingOptions
The SnappingOptions for sketching.
ArcGIS Maps SDK for JavaScript
unit
System.Nullable<SystemOrLengthUnit>
Unit system (imperial, metric) or specific unit used for displaying the distance values.
ArcGIS Maps SDK for JavaScript
unitOptions
System.Collections.Generic.IReadOnlyList<SystemOrLengthUnit>
List of available units and unit systems (imperial, metric) for displaying the distance values.
ArcGIS Maps SDK for JavaScript
viewModel
DistanceMeasurement2DViewModel
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
DistanceMeasurement2DWidget.SnappingOptions Property
The SnappingOptions for sketching.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.SnappingOptions? SnappingOptions { get; set; }
Property Value
DistanceMeasurement2DWidget.Type Property
The type of widget
public override dymaptic.GeoBlazor.Core.Enums.WidgetType Type { get; }
Property Value
DistanceMeasurement2DWidget.Unit 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> Unit { get; set; }
Property Value
System.Nullable<SystemOrLengthUnit>
DistanceMeasurement2DWidget.UnitOptions Property
List of available units and unit systems (imperial, metric) for displaying the distance values.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit>? UnitOptions { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<SystemOrLengthUnit>
DistanceMeasurement2DWidget.ViewModel Property
The view model for this widget.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.DistanceMeasurement2DViewModel? ViewModel { get; set; }
Property Value
DistanceMeasurement2DViewModel
Methods
DistanceMeasurement2DWidget.AddToUnitOptions(SystemOrLengthUnit[]) Method
Asynchronously adds elements to the UnitOptions property.
public System.Threading.Tasks.Task AddToUnitOptions(params dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit[] values);
Parameters
values
SystemOrLengthUnit[]
The elements to add.
Returns
DistanceMeasurement2DWidget.GetSnappingOptions() Method
Asynchronously retrieve the current value of the SnappingOptions property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.SnappingOptions?> GetSnappingOptions();
Returns
System.Threading.Tasks.Task<SnappingOptions>
DistanceMeasurement2DWidget.GetUnit() Method
Asynchronously retrieve the current value of the Unit property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit>> GetUnit();
Returns
System.Threading.Tasks.Task<System.Nullable<SystemOrLengthUnit>>
DistanceMeasurement2DWidget.GetUnitOptions() Method
Asynchronously retrieve the current value of the UnitOptions property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit>?> GetUnitOptions();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<SystemOrLengthUnit>>
DistanceMeasurement2DWidget.GetViewModel() Method
Asynchronously retrieve the current value of the ViewModel property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.DistanceMeasurement2DViewModel?> GetViewModel();
Returns
System.Threading.Tasks.Task<DistanceMeasurement2DViewModel>
DistanceMeasurement2DWidget.RemoveFromUnitOptions(SystemOrLengthUnit[]) Method
Asynchronously remove an element from the UnitOptions property.
public System.Threading.Tasks.Task RemoveFromUnitOptions(params dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit[] values);
Parameters
values
SystemOrLengthUnit[]
The elements to remove.
Returns
DistanceMeasurement2DWidget.SetSnappingOptions(SnappingOptions) Method
Asynchronously set the value of the SnappingOptions property after render.
public System.Threading.Tasks.Task SetSnappingOptions(dymaptic.GeoBlazor.Core.Components.SnappingOptions? value);
Parameters
value
SnappingOptions
The value to set.
Returns
DistanceMeasurement2DWidget.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.SystemOrLengthUnit> value);
Parameters
value
System.Nullable<SystemOrLengthUnit>
The value to set.
Returns
DistanceMeasurement2DWidget.SetUnitOptions(IReadOnlyList) Method
Asynchronously set the value of the UnitOptions property after render.
public System.Threading.Tasks.Task SetUnitOptions(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Core.Enums.SystemOrLengthUnit>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<SystemOrLengthUnit>
The value to set.
Returns
DistanceMeasurement2DWidget.SetViewModel(DistanceMeasurement2DViewModel) Method
Asynchronously set the value of the ViewModel property after render.
public System.Threading.Tasks.Task SetViewModel(dymaptic.GeoBlazor.Core.Components.DistanceMeasurement2DViewModel? value);
Parameters
value
DistanceMeasurement2DViewModel
The value to set.
Returns
DistanceMeasurement2DWidget.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()