dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Widgets
LocateWidget Class
GeoBlazor Docs Provides a simple widget that animates the View to the user's current location. ArcGIS Maps SDK for JavaScript
public class LocateWidget : dymaptic.GeoBlazor.Core.Components.Widgets.Widget
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Widget 🡒 LocateWidget
Constructors
LocateWidget() Constructor
Parameterless constructor for use as a Razor Component.
public LocateWidget();
LocateWidget(PositionOptions, Nullable, Nullable, Nullable, Nullable, string, MapView, Nullable, Nullable, Action<MapView,GoToParameters>) Constructor
Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.
public LocateWidget(dymaptic.GeoBlazor.Core.Options.PositionOptions? geolocationOptions=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition> position=null, System.Nullable<int> scale=null, System.Nullable<bool> autoDestroyDisabled=null, System.Nullable<bool> goToLocationDisabled=null, string? containerId=null, dymaptic.GeoBlazor.Core.Components.Views.MapView? view=null, System.Nullable<bool> visible=null, System.Nullable<System.Guid> layerId=null, System.Action<dymaptic.GeoBlazor.Core.Components.Views.MapView,dymaptic.GeoBlazor.Core.Model.GoToParameters>? onGoToOverride=null);
Parameters
geolocationOptions PositionOptions
The browser's Geolocation API Position options for locating. default null ArcGIS Maps SDK for JavaScript
position System.Nullable<OverlayPosition>
The position of the widget in relation to the map view.
scale System.Nullable<System.Int32>
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
autoDestroyDisabled System.Nullable<System.Boolean>
If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy method when you are done to prevent memory leaks. default false
goToLocationDisabled System.Nullable<System.Boolean>
Indicates whether to navigate the view to the position and scale of the geolocated result. default false
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.
view MapView
The parent view of the current component.
visible System.Nullable<System.Boolean>
Indicates the visibility of the component. Default value: true.
layerId System.Nullable<System.Guid>
The GeoBlazor Id of the relevant Layer for the MapComponent. Not always applicable to every component type.
onGoToOverride System.Action<MapView,GoToParameters>
This function provides the ability to override either the MapView goTo() or SceneView goTo() methods. ArcGIS Maps SDK for JavaScript
Properties
LocateWidget.AutoDestroyDisabled Property
GeoBlazor Docs If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the destroy method when you are done to prevent memory leaks. default false
public System.Nullable<bool> AutoDestroyDisabled { get; set; }
Property Value
System.Nullable<System.Boolean>
LocateWidget.GeolocationOptions Property
GeoBlazor Docs The browser's Geolocation API Position options for locating. default null ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Options.PositionOptions? GeolocationOptions { get; set; }
Property Value
LocateWidget.GoToLocationDisabled Property
GeoBlazor Docs Indicates whether to navigate the view to the position and scale of the geolocated result. default false
public System.Nullable<bool> GoToLocationDisabled { get; set; }
Property Value
System.Nullable<System.Boolean>
LocateWidget.HasGoToOverride Property
A convenience property that signifies whether a custom OnGoToOverride function was registered.
public bool HasGoToOverride { get; }
Property Value
LocateWidget.OnGoToOverride Property
GeoBlazor Docs This function provides the ability to override either the MapView goTo() or SceneView goTo() methods. ArcGIS Maps SDK for JavaScript
public System.Action<dymaptic.GeoBlazor.Core.Components.Views.MapView,dymaptic.GeoBlazor.Core.Model.GoToParameters>? OnGoToOverride { get; set; }
Property Value
System.Action<MapView,GoToParameters>
LocateWidget.Scale Property
GeoBlazor Docs 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
public System.Nullable<int> Scale { get; set; }
Property Value
LocateWidget.Type Property
The type of widget
public override dymaptic.GeoBlazor.Core.Enums.WidgetType Type { get; }
Property Value
Methods
LocateWidget.CancelLocate() Method
GeoBlazor Docs This function provides the ability to interrupt and cancel the process of programmatically obtaining the location of the user's device.
public System.Threading.Tasks.Task CancelLocate();
Returns
LocateWidget.GetAutoDestroyDisabled() Method
Asynchronously retrieve the current value of the AutoDestroyDisabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetAutoDestroyDisabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
LocateWidget.GetGeolocationOptions() Method
Asynchronously retrieve the current value of the GeolocationOptions property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Options.PositionOptions?> GetGeolocationOptions();
Returns
System.Threading.Tasks.Task<PositionOptions>
LocateWidget.GetGoToLocationDisabled() Method
Asynchronously retrieve the current value of the GoToLocationDisabled property.
public System.Threading.Tasks.Task<System.Nullable<bool>> GetGoToLocationDisabled();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Boolean>>
LocateWidget.GetScale() Method
Asynchronously retrieve the current value of the Scale property.
public System.Threading.Tasks.Task<System.Nullable<int>> GetScale();
Returns
System.Threading.Tasks.Task<System.Nullable<System.Int32>>
LocateWidget.Locate() Method
Animates the view to the user's location. ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Interfaces.IGeolocationPosition?> Locate();
Returns
System.Threading.Tasks.Task<IGeolocationPosition>
LocateWidget.OnJsGoToOverride(MapView, GoToParameters) Method
JS-invokable method that triggers the OnGoToOverride function. Should not be called by consuming code.
public void OnJsGoToOverride(dymaptic.GeoBlazor.Core.Components.Views.MapView view, dymaptic.GeoBlazor.Core.Model.GoToParameters goToParameters);
Parameters
view MapView
goToParameters GoToParameters
LocateWidget.SetAutoDestroyDisabled(Nullable) Method
Asynchronously set the value of the AutoDestroyDisabled property after render.
public System.Threading.Tasks.Task SetAutoDestroyDisabled(System.Nullable<bool> value);
Parameters
value System.Nullable<System.Boolean>
The value to set.
Returns
LocateWidget.SetGeolocationOptions(PositionOptions) Method
Asynchronously set the value of the GeolocationOptions property after render.
public System.Threading.Tasks.Task SetGeolocationOptions(dymaptic.GeoBlazor.Core.Options.PositionOptions? value);
Parameters
value PositionOptions
The value to set.
Returns
LocateWidget.SetGoToLocationDisabled(Nullable) Method
Asynchronously set the value of the GoToLocationDisabled property after render.
public System.Threading.Tasks.Task SetGoToLocationDisabled(System.Nullable<bool> value);
Parameters
value System.Nullable<System.Boolean>
The value to set.
Returns
LocateWidget.SetScale(Nullable) Method
Asynchronously set the value of the Scale property after render.
public System.Threading.Tasks.Task SetScale(System.Nullable<int> value);
Parameters
value System.Nullable<System.Int32>
The value to set.