dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components
DistanceMeasurement2DViewModel Class
Provides the logic for the DistanceMeasurement2D widget.
ArcGIS Maps SDK for JavaScript
public class DistanceMeasurement2DViewModel : dymaptic.GeoBlazor.Core.Components.MapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IMeasurementViewModelActiveViewModel,
dymaptic.GeoBlazor.Core.Interfaces.IMapComponent
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 DistanceMeasurement2DViewModel
Implements IMeasurementViewModelActiveViewModel, IMapComponent
Constructors
DistanceMeasurement2DViewModel() Constructor
Parameterless constructor for use as a Razor Component.
public DistanceMeasurement2DViewModel();
DistanceMeasurement2DViewModel(SnappingOptions, Nullable, IReadOnlyList) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public DistanceMeasurement2DViewModel(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);
Parameters
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
Properties
DistanceMeasurement2DViewModel.Measurement Property
The length and geometry of the measurement polyline in meters.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.DistanceMeasurement2DViewModelMeasurement? Measurement { get; set; }
Property Value
DistanceMeasurement2DViewModelMeasurement
DistanceMeasurement2DViewModel.MeasurementLabel Property
This property returns the locale specific representation of the length.
ArcGIS Maps SDK for JavaScript
public string? MeasurementLabel { get; set; }
Property Value
DistanceMeasurement2DViewModel.SnappingOptions Property
The SnappingOptions for sketching.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.SnappingOptions? SnappingOptions { get; set; }
Property Value
DistanceMeasurement2DViewModel.State Property
The view model’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>
DistanceMeasurement2DViewModel.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>
DistanceMeasurement2DViewModel.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>
Methods
DistanceMeasurement2DViewModel.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
DistanceMeasurement2DViewModel.Clear() Method
Clears the current measurement.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task Clear();
Returns
DistanceMeasurement2DViewModel.GetMeasurement() Method
Asynchronously retrieve the current value of the Measurement property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.DistanceMeasurement2DViewModelMeasurement?> GetMeasurement();
Returns
System.Threading.Tasks.Task<DistanceMeasurement2DViewModelMeasurement>
DistanceMeasurement2DViewModel.GetMeasurementLabel() Method
Asynchronously retrieve the current value of the MeasurementLabel property.
public System.Threading.Tasks.Task<string?> GetMeasurementLabel();
Returns
System.Threading.Tasks.Task<System.String>
DistanceMeasurement2DViewModel.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>
DistanceMeasurement2DViewModel.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>>
DistanceMeasurement2DViewModel.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>>
DistanceMeasurement2DViewModel.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>>
DistanceMeasurement2DViewModel.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
DistanceMeasurement2DViewModel.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
DistanceMeasurement2DViewModel.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
DistanceMeasurement2DViewModel.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
DistanceMeasurement2DViewModel.Start() Method
Starts a new measurement.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task Start();
Returns
DistanceMeasurement2DViewModel.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()