GeoBlazor Pro
dymaptic.GeoBlazor.Pro
dymaptic.GeoBlazor.Pro.Model
CoordinateConversionViewModel Class
Provides the logic for the CoordinateConversion widget.
ArcGIS Maps SDK for JavaScript
public class CoordinateConversionViewModel : dymaptic.GeoBlazor.Core.Components.MapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IGoTo
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 dymaptic.GeoBlazor.Core.Components.MapComponent 🡒 CoordinateConversionViewModel
Implements dymaptic.GeoBlazor.Core.Interfaces.IGoTo
Constructors
CoordinateConversionViewModel() Constructor
Parameterless constructor for use as a Razor Component.
public CoordinateConversionViewModel();
CoordinateConversionViewModel(IReadOnlyList, Point, IReadOnlyList, GoToOverride, Symbol, 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 CoordinateConversionViewModel(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.Conversion>? conversions=null, dymaptic.GeoBlazor.Core.Components.Geometries.Point? currentLocation=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.ConversionFormat>? formats=null, dymaptic.GeoBlazor.Core.Functions.GoToOverride? goToOverride=null, dymaptic.GeoBlazor.Core.Components.Symbols.Symbol? locationSymbol=null, System.Nullable<dymaptic.GeoBlazor.Pro.Enums.CoordinateConversionMode> mode=null, System.Nullable<bool> storageEnabled=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType> storageType=null);
Parameters
conversions
System.Collections.Generic.IReadOnlyList<Conversion>
A Collection containing every Conversion
that the widget is currently displaying.
ArcGIS Maps SDK for JavaScript
currentLocation
dymaptic.GeoBlazor.Core.Components.Geometries.Point
Describes the location of the coordinates currently displayed by the widget as a Point.
ArcGIS Maps SDK for JavaScript
formats
System.Collections.Generic.IReadOnlyList<ConversionFormat>
A Collection containing every Format
that the widget is capable of displaying.
ArcGIS Maps SDK for JavaScript
goToOverride
dymaptic.GeoBlazor.Core.Functions.GoToOverride
This function provides the ability to override either the MapView goTo() or SceneView goTo() methods.
ArcGIS Maps SDK for JavaScript
locationSymbol
dymaptic.GeoBlazor.Core.Components.Symbols.Symbol
This symbol is used to visualize the location currently described by the widget when capture
mode
is active.
ArcGIS Maps SDK for JavaScript
mode
System.Nullable<CoordinateConversionMode>
Describes the current mode of the widget.
default “live”
ArcGIS Maps SDK for JavaScript
storageEnabled
System.Nullable<System.Boolean>
If this property is set to true
, sessionStorage or localStorage (depending on storageType)
will be used to hydrate and persist the CoordinateConversion widget’s state.
default true
ArcGIS Maps SDK for JavaScript
storageType
System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType>
This property determines whether sessionStorage or localStorage will be used to store widget state.
default “session”
ArcGIS Maps SDK for JavaScript
Properties
CoordinateConversionViewModel.Conversions Property
A Collection containing every Conversion
that the widget is currently displaying.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.Conversion>? Conversions { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<Conversion>
CoordinateConversionViewModel.CurrentLocation Property
Describes the location of the coordinates currently displayed by the widget as a Point.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.Geometries.Point? CurrentLocation { get; set; }
Property Value
dymaptic.GeoBlazor.Core.Components.Geometries.Point
CoordinateConversionViewModel.Formats Property
A Collection containing every Format
that the widget is capable of displaying.
ArcGIS Maps SDK for JavaScript
public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.ConversionFormat>? Formats { get; set; }
Property Value
System.Collections.Generic.IReadOnlyList<ConversionFormat>
CoordinateConversionViewModel.GoToOverride Property
This function provides the ability to override either the MapView goTo() or SceneView goTo() methods.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Functions.GoToOverride? GoToOverride { get; set; }
Implements GoToOverride
Property Value
dymaptic.GeoBlazor.Core.Functions.GoToOverride
CoordinateConversionViewModel.HasGoToOverride Property
A convenience property that signifies whether a custom GoToOverride function was registered.
public bool HasGoToOverride { get; }
Implements HasGoToOverride
Property Value
CoordinateConversionViewModel.LocationSymbol Property
This symbol is used to visualize the location currently described by the widget when capture
mode
is active.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.Symbols.Symbol? LocationSymbol { get; set; }
Property Value
dymaptic.GeoBlazor.Core.Components.Symbols.Symbol
CoordinateConversionViewModel.Mode Property
Describes the current mode of the widget.
default “live”
ArcGIS Maps SDK for JavaScript
public System.Nullable<dymaptic.GeoBlazor.Pro.Enums.CoordinateConversionMode> Mode { get; set; }
Property Value
System.Nullable<CoordinateConversionMode>
CoordinateConversionViewModel.State Property
The view model’s state.
default “disabled”
ArcGIS Maps SDK for JavaScript
public System.Nullable<dymaptic.GeoBlazor.Core.Enums.ViewModelState> State { get; set; }
Property Value
System.Nullable<dymaptic.GeoBlazor.Core.Enums.ViewModelState>
CoordinateConversionViewModel.StorageEnabled Property
If this property is set to true
, sessionStorage or localStorage (depending on storageType)
will be used to hydrate and persist the CoordinateConversion widget’s state.
default true
ArcGIS Maps SDK for JavaScript
public System.Nullable<bool> StorageEnabled { get; set; }
Property Value
System.Nullable<System.Boolean>
CoordinateConversionViewModel.StorageType Property
This property determines whether sessionStorage or localStorage will be used to store widget state.
default “session”
ArcGIS Maps SDK for JavaScript
public System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType> StorageType { get; set; }
Property Value
System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType>
Methods
CoordinateConversionViewModel.AddToConversions(Conversion[]) Method
Asynchronously adds elements to the Conversions property.
public System.Threading.Tasks.Task AddToConversions(params dymaptic.GeoBlazor.Pro.Components.Conversion[] values);
Parameters
values
Conversion[]
The elements to add.
Returns
CoordinateConversionViewModel.AddToFormats(ConversionFormat[]) Method
Asynchronously adds elements to the Formats property.
public System.Threading.Tasks.Task AddToFormats(params dymaptic.GeoBlazor.Pro.Components.ConversionFormat[] values);
Parameters
values
ConversionFormat[]
The elements to add.
Returns
CoordinateConversionViewModel.Convert(ConversionFormat, Point) Method
Attempt to convert a point into a Position.
param point The point to convert.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Position?> Convert(dymaptic.GeoBlazor.Pro.Components.ConversionFormat format, dymaptic.GeoBlazor.Core.Components.Geometries.Point point);
Parameters
format
ConversionFormat
The format that describes how the point should be converted.
point
dymaptic.GeoBlazor.Core.Components.Geometries.Point
The point to convert.
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Position>
CoordinateConversionViewModel.GetConversions() Method
Asynchronously retrieve the current value of the Conversions property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.Conversion>?> GetConversions();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Conversion>>
CoordinateConversionViewModel.GetCurrentLocation() Method
Asynchronously retrieve the current value of the CurrentLocation property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point?> GetCurrentLocation();
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point>
CoordinateConversionViewModel.GetFormats() Method
Asynchronously retrieve the current value of the Formats property.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.ConversionFormat>?> GetFormats();
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<ConversionFormat>>
CoordinateConversionViewModel.GetLocationSymbol() Method
Asynchronously retrieve the current value of the LocationSymbol property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Symbols.Symbol?> GetLocationSymbol();
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Symbols.Symbol>
CoordinateConversionViewModel.GetMode() Method
Asynchronously retrieve the current value of the Mode property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Pro.Enums.CoordinateConversionMode>> GetMode();
Returns
System.Threading.Tasks.Task<System.Nullable<CoordinateConversionMode>>
CoordinateConversionViewModel.GetState() Method
Asynchronously retrieve the current value of the State property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.ViewModelState>> GetState();
Returns
System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.ViewModelState>>
CoordinateConversionViewModel.GetStorageEnabled() Method
Asynchronously retrieve the current value of the StorageEnabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetStorageEnabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
CoordinateConversionViewModel.GetStorageType() Method
Asynchronously retrieve the current value of the StorageType property.
public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType>> GetStorageType();
Returns
System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType>>
CoordinateConversionViewModel.OnJsGoToOverride(IJSStreamReference) Method
JS-invokable method that triggers the GoToOverride function.
Should not be called by consuming code.
public System.Threading.Tasks.Task OnJsGoToOverride(Microsoft.JSInterop.IJSStreamReference jsStreamRef);
Parameters
jsStreamRef
Microsoft.JSInterop.IJSStreamReference
Implements OnJsGoToOverride(IJSStreamReference)
Returns
CoordinateConversionViewModel.RemoveFromConversions(Conversion[]) Method
Asynchronously remove an element from the Conversions property.
public System.Threading.Tasks.Task RemoveFromConversions(params dymaptic.GeoBlazor.Pro.Components.Conversion[] values);
Parameters
values
Conversion[]
The elements to remove.
Returns
CoordinateConversionViewModel.RemoveFromFormats(ConversionFormat[]) Method
Asynchronously remove an element from the Formats property.
public System.Threading.Tasks.Task RemoveFromFormats(params dymaptic.GeoBlazor.Pro.Components.ConversionFormat[] values);
Parameters
values
ConversionFormat[]
The elements to remove.
Returns
CoordinateConversionViewModel.ReverseConvert(string, ConversionFormat) Method
Attempt to convert a string into a Point.
param format Specifies the format of the input coordinate.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point?> ReverseConvert(string coordinate, dymaptic.GeoBlazor.Pro.Components.ConversionFormat format);
Parameters
coordinate
System.String
The coordinate string.
format
ConversionFormat
Specifies the format of the input coordinate.
Returns
System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Geometries.Point>
CoordinateConversionViewModel.SetConversions(IReadOnlyList) Method
Asynchronously set the value of the Conversions property after render.
public System.Threading.Tasks.Task SetConversions(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.Conversion>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<Conversion>
The value to set.
Returns
CoordinateConversionViewModel.SetCurrentLocation(Point) Method
Asynchronously set the value of the CurrentLocation property after render.
public System.Threading.Tasks.Task SetCurrentLocation(dymaptic.GeoBlazor.Core.Components.Geometries.Point? value);
Parameters
value
dymaptic.GeoBlazor.Core.Components.Geometries.Point
The value to set.
Returns
CoordinateConversionViewModel.SetFormats(IReadOnlyList) Method
Asynchronously set the value of the Formats property after render.
public System.Threading.Tasks.Task SetFormats(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.ConversionFormat>? value);
Parameters
value
System.Collections.Generic.IReadOnlyList<ConversionFormat>
The value to set.
Returns
CoordinateConversionViewModel.SetLocationSymbol(Symbol) Method
Asynchronously set the value of the LocationSymbol property after render.
public System.Threading.Tasks.Task SetLocationSymbol(dymaptic.GeoBlazor.Core.Components.Symbols.Symbol? value);
Parameters
value
dymaptic.GeoBlazor.Core.Components.Symbols.Symbol
The value to set.
Returns
CoordinateConversionViewModel.SetMode(Nullable) Method
Asynchronously set the value of the Mode property after render.
public System.Threading.Tasks.Task SetMode(System.Nullable<dymaptic.GeoBlazor.Pro.Enums.CoordinateConversionMode> value);
Parameters
value
System.Nullable<CoordinateConversionMode>
The value to set.
Returns
CoordinateConversionViewModel.SetStorageEnabled(Nullable) Method
Asynchronously set the value of the StorageEnabled property after render.
public System.Threading.Tasks.Task SetStorageEnabled(System.Nullable<bool> value);
Parameters
value
System.Nullable<System.Boolean>
The value to set.
Returns
CoordinateConversionViewModel.SetStorageType(Nullable) Method
Asynchronously set the value of the StorageType property after render.
public System.Threading.Tasks.Task SetStorageType(System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType> value);
Parameters
value
System.Nullable<dymaptic.GeoBlazor.Core.Enums.StorageType>
The value to set.
Returns
CoordinateConversionViewModel.UpdateConversions(IReadOnlyCollection, Point) Method
Update the input conversions based on the input point.
param location A point that will be used to update each input conversion.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.Conversion[]?> UpdateConversions(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Pro.Components.Conversion> conversions, dymaptic.GeoBlazor.Core.Components.Geometries.Point location);
Parameters
conversions
System.Collections.Generic.IReadOnlyCollection<Conversion>
An array of Conversions to be updated.
location
dymaptic.GeoBlazor.Core.Components.Geometries.Point
A point that will be used to update each input conversion.
Returns
System.Threading.Tasks.Task<Conversion[]>
CoordinateConversionViewModel.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()