GeoBlazor Pro

dymaptic.GeoBlazor.Pro

dymaptic.GeoBlazor.Pro.Components

TrackViewModel Class

Provides the logic for the Track component and Track widget, which
animates the View
to the user’s location when clicked and tracks it as the location is updated.
ArcGIS Maps SDK for JavaScript

public class TrackViewModel : dymaptic.GeoBlazor.Core.Components.MapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IGeolocationPositioning,
dymaptic.GeoBlazor.Core.Interfaces.IMapComponent,
dymaptic.GeoBlazor.Core.Interfaces.IGoTo

Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 dymaptic.GeoBlazor.Core.Components.MapComponent 🡒 TrackViewModel

Implements dymaptic.GeoBlazor.Core.Interfaces.IGeolocationPositioning, dymaptic.GeoBlazor.Core.Interfaces.IMapComponent, dymaptic.GeoBlazor.Core.Interfaces.IGoTo

Constructors

TrackViewModel() Constructor

Parameterless constructor for use as a Razor Component.

public TrackViewModel();

TrackViewModel(Error, GeolocationOptions, Nullable, GoToOverride, Graphic, Func, Nullable) Constructor

Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.

public TrackViewModel(dymaptic.GeoBlazor.Core.Model.Error? error=null, dymaptic.GeoBlazor.Core.Components.GeolocationOptions? geolocationOptions=null, System.Nullable<bool> goToLocationEnabled=null, dymaptic.GeoBlazor.Core.Functions.GoToOverride? goToOverride=null, dymaptic.GeoBlazor.Core.Components.Graphic? graphic=null, System.Func<System.Threading.Tasks.Task>? positionFilterFunction=null, System.Nullable<double> scale=null);

Parameters

error dymaptic.GeoBlazor.Core.Model.Error

Error that caused the last track-error event to fire.
default null
ArcGIS Maps SDK for JavaScript

geolocationOptions dymaptic.GeoBlazor.Core.Components.GeolocationOptions

An object used for setting optional position parameters.
default null
ArcGIS Maps SDK for JavaScript

goToLocationEnabled System.Nullable<System.Boolean>

Indicates whether to navigate the view to the position and scale of the geolocated result.
default true
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

graphic dymaptic.GeoBlazor.Core.Components.Graphic

The graphic used to show the user’s location on the map.
ArcGIS Maps SDK for JavaScript

positionFilterFunction System.Func<System.Threading.Tasks.Task>

A function that is used as an expression to evaluate geolocation points, and returns a boolean
value.
default null
ArcGIS Maps SDK for JavaScript

scale System.Nullable<System.Double>

Indicates the scale to set on the view when navigating to the position of the geolocated result, after a location is returned from the track event.
default null
ArcGIS Maps SDK for JavaScript

Properties

TrackViewModel.Error Property

Error that caused the last track-error event to fire.
default null
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Model.Error? Error { get; set; }

Property Value

dymaptic.GeoBlazor.Core.Model.Error

TrackViewModel.GeolocationOptions Property

An object used for setting optional position parameters.
default null
ArcGIS Maps SDK for JavaScript

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

Implements GeolocationOptions

Property Value

dymaptic.GeoBlazor.Core.Components.GeolocationOptions

TrackViewModel.GoToLocationEnabled Property

Indicates whether to navigate the view to the position and scale of the geolocated result.
default true
ArcGIS Maps SDK for JavaScript

public System.Nullable<bool> GoToLocationEnabled { get; set; }

Implements GoToLocationEnabled

Property Value

System.Nullable<System.Boolean>

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

TrackViewModel.Graphic Property

The graphic used to show the user’s location on the map.
ArcGIS Maps SDK for JavaScript

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

Implements Graphic

Property Value

dymaptic.GeoBlazor.Core.Components.Graphic

TrackViewModel.HasGoToOverride Property

A convenience property that signifies whether a custom GoToOverride function was registered.

public bool HasGoToOverride { get; }

Implements HasGoToOverride

Property Value

System.Boolean

TrackViewModel.HasTrackErrorListener Property

Used in JavaScript layer to determine if the event listener is registered.

public bool HasTrackErrorListener { get; }

Property Value

System.Boolean

TrackViewModel.HasTrackListener Property

Used in JavaScript layer to determine if the event listener is registered.

public bool HasTrackListener { get; }

Property Value

System.Boolean

TrackViewModel.OnTrack Property

Fires after the start() method is called and a position is found.

public Microsoft.AspNetCore.Components.EventCallback<dymaptic.GeoBlazor.Pro.Events.TrackViewModelTrackEvent> OnTrack { get; set; }

Property Value

Microsoft.AspNetCore.Components.EventCallback<TrackViewModelTrackEvent>

TrackViewModel.OnTrackError Property

Fires after the start() method is called and an error is returned.

public Microsoft.AspNetCore.Components.EventCallback<dymaptic.GeoBlazor.Pro.Events.TrackViewModelTrackErrorEvent> OnTrackError { get; set; }

Property Value

Microsoft.AspNetCore.Components.EventCallback<TrackViewModelTrackErrorEvent>

TrackViewModel.PositionFilterFunction Property

A function that is used as an expression to evaluate geolocation points, and returns a boolean
value.
default null
ArcGIS Maps SDK for JavaScript

public System.Func<System.Threading.Tasks.Task>? PositionFilterFunction { get; set; }

Property Value

System.Func<System.Threading.Tasks.Task>

TrackViewModel.Scale Property

Indicates the scale to set on the view when navigating to the position of the geolocated result, after a location is returned from the track event.
default null
ArcGIS Maps SDK for JavaScript

public System.Nullable<double> Scale { get; set; }

Implements Scale

Property Value

System.Nullable<System.Double>

TrackViewModel.State Property

The current state of the widget.
default “disabled”
ArcGIS Maps SDK for JavaScript

public System.Nullable<dymaptic.GeoBlazor.Pro.Enums.TrackViewModelState> State { get; set; }

Property Value

System.Nullable<TrackViewModelState>

TrackViewModel.Tracking Property

Indicates whether new positions are being watched.
default false
ArcGIS Maps SDK for JavaScript

public System.Nullable<bool> Tracking { get; set; }

Property Value

System.Nullable<System.Boolean>

Methods

TrackViewModel.GetError() Method

Asynchronously retrieve the current value of the Error property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Model.Error?> GetError();

Returns

System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Model.Error>

TrackViewModel.GetGeolocationOptions() Method

Asynchronously retrieve the current value of the GeolocationOptions property.

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

Implements GetGeolocationOptions()

Returns

System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.GeolocationOptions>

TrackViewModel.GetGoToLocationEnabled() Method

Asynchronously retrieve the current value of the GoToLocationEnabled property.

public System.Threading.Tasks.Task<System.Nullable<bool>> GetGoToLocationEnabled();

Implements GetGoToLocationEnabled()

Returns

System.Threading.Tasks.Task<System.Nullable<System.Boolean>>

TrackViewModel.GetGraphic() Method

Asynchronously retrieve the current value of the Graphic property.

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

Implements GetGraphic()

Returns

System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.Graphic>

TrackViewModel.GetPositionFilterFunction() Method

Asynchronously retrieve the current value of the PositionFilterFunction property.

public System.Threading.Tasks.Task<System.Func<System.Threading.Tasks.Task>?> GetPositionFilterFunction();

Returns

System.Threading.Tasks.Task<System.Func<System.Threading.Tasks.Task>>

TrackViewModel.GetScale() Method

Asynchronously retrieve the current value of the Scale property.

public System.Threading.Tasks.Task<System.Nullable<double>> GetScale();

Implements GetScale()

Returns

System.Threading.Tasks.Task<System.Nullable<System.Double>>

TrackViewModel.GetState() Method

Asynchronously retrieve the current value of the State property.

public System.Threading.Tasks.Task<System.Nullable<dymaptic.GeoBlazor.Pro.Enums.TrackViewModelState>> GetState();

Returns

System.Threading.Tasks.Task<System.Nullable<TrackViewModelState>>

TrackViewModel.GetTracking() Method

Asynchronously retrieve the current value of the Tracking property.

public System.Threading.Tasks.Task<System.Nullable<bool>> GetTracking();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Boolean>>

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

System.Threading.Tasks.Task

TrackViewModel.OnJsTrack(IJSStreamReference) Method

JavaScript-Invokable Method for internal use only.

public System.Threading.Tasks.Task OnJsTrack(Microsoft.JSInterop.IJSStreamReference jsStreamRef);

Parameters

jsStreamRef Microsoft.JSInterop.IJSStreamReference

Returns

System.Threading.Tasks.Task

TrackViewModel.OnJsTrackError(IJSStreamReference) Method

JavaScript-Invokable Method for internal use only.

public System.Threading.Tasks.Task OnJsTrackError(Microsoft.JSInterop.IJSStreamReference jsStreamRef);

Parameters

jsStreamRef Microsoft.JSInterop.IJSStreamReference

Returns

System.Threading.Tasks.Task

TrackViewModel.SetError(Error) Method

Asynchronously set the value of the Error property after render.

public System.Threading.Tasks.Task SetError(dymaptic.GeoBlazor.Core.Model.Error? value);

Parameters

value dymaptic.GeoBlazor.Core.Model.Error

The value to set.

Returns

System.Threading.Tasks.Task

TrackViewModel.SetGeolocationOptions(GeolocationOptions) Method

Asynchronously set the value of the GeolocationOptions property after render.

public System.Threading.Tasks.Task SetGeolocationOptions(dymaptic.GeoBlazor.Core.Components.GeolocationOptions? value);

Parameters

value dymaptic.GeoBlazor.Core.Components.GeolocationOptions

The value to set.

Implements SetGeolocationOptions(GeolocationOptions)

Returns

System.Threading.Tasks.Task

TrackViewModel.SetGoToLocationEnabled(Nullable) Method

Asynchronously set the value of the GoToLocationEnabled property after render.

public System.Threading.Tasks.Task SetGoToLocationEnabled(System.Nullable<bool> value);

Parameters

value System.Nullable<System.Boolean>

The value to set.

Implements SetGoToLocationEnabled(Nullable<bool>)

Returns

System.Threading.Tasks.Task

TrackViewModel.SetGraphic(Graphic) Method

Asynchronously set the value of the Graphic property after render.

public System.Threading.Tasks.Task SetGraphic(dymaptic.GeoBlazor.Core.Components.Graphic? value);

Parameters

value dymaptic.GeoBlazor.Core.Components.Graphic

The value to set.

Implements SetGraphic(Graphic)

Returns

System.Threading.Tasks.Task

TrackViewModel.SetPositionFilterFunction(Func) Method

Asynchronously set the value of the PositionFilterFunction property after render.

public System.Threading.Tasks.Task SetPositionFilterFunction(System.Func<System.Threading.Tasks.Task>? value);

Parameters

value System.Func<System.Threading.Tasks.Task>

The value to set.

Returns

System.Threading.Tasks.Task

TrackViewModel.SetScale(Nullable) Method

Asynchronously set the value of the Scale property after render.

public System.Threading.Tasks.Task SetScale(System.Nullable<double> value);

Parameters

value System.Nullable<System.Double>

The value to set.

Implements SetScale(Nullable<double>)

Returns

System.Threading.Tasks.Task

TrackViewModel.Start() Method

When executed, tracking starts at the
user’s location.
ArcGIS Maps SDK for JavaScript

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

Returns

System.Threading.Tasks.Task

TrackViewModel.Stop() Method

Stops tracking the user’s location when executed.
ArcGIS Maps SDK for JavaScript

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

Returns

System.Threading.Tasks.Task

TrackViewModel.ValidateRequiredGeneratedChildren() Method

Validates source-generated child components.

public override void ValidateRequiredGeneratedChildren();

Implements ValidateRequiredGeneratedChildren()