dymaptic.GeoBlazor.Core
dymaptic.GeoBlazor.Core.Components.Widgets
CompassWidget Class
The Compass widget indicates where north is in relation to the current view
rotation
or camera heading.
ArcGIS Maps SDK for JavaScript
public class CompassWidget : dymaptic.GeoBlazor.Core.Components.Widgets.Widget,
dymaptic.GeoBlazor.Core.Interfaces.IGoTo
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 MapComponent 🡒 Widget 🡒 CompassWidget
Implements IGoTo
Constructors
CompassWidget() Constructor
Parameterless constructor for use as a Razor Component.
public CompassWidget();
CompassWidget(string, GoToOverride, string, string, MapView, Nullable, CompassViewModel, 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 CompassWidget(string? containerId=null, dymaptic.GeoBlazor.Core.Functions.GoToOverride? goToOverride=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.CompassViewModel? 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.
goToOverride
GoToOverride(GoToOverrideParameters)
This function provides the ability to override either the MapView goTo() or SceneView goTo() methods.
ArcGIS Maps SDK for JavaScript
icon
System.String
Icon displayed in the widget’s button.
default “compass-needle”
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.
viewModel
CompassViewModel
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
CompassWidget.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
GoToOverride(GoToOverrideParameters)
CompassWidget.HasGoToOverride Property
A convenience property that signifies whether a custom GoToOverride function was registered.
public bool HasGoToOverride { get; }
Implements HasGoToOverride
Property Value
CompassWidget.Type Property
The type of widget
public override dymaptic.GeoBlazor.Core.Enums.WidgetType Type { get; }
Property Value
CompassWidget.ViewModel Property
The view model for this widget.
ArcGIS Maps SDK for JavaScript
public dymaptic.GeoBlazor.Core.Components.CompassViewModel? ViewModel { get; set; }
Property Value
Methods
CompassWidget.GetViewModel() Method
Asynchronously retrieve the current value of the ViewModel property.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.CompassViewModel?> GetViewModel();
Returns
System.Threading.Tasks.Task<CompassViewModel>
CompassWidget.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
CompassWidget.Reset() Method
If working in a MapView, sets the view’s
rotation to 0
.
ArcGIS Maps SDK for JavaScript
public System.Threading.Tasks.Task Reset();
Returns
CompassWidget.SetViewModel(CompassViewModel) Method
Asynchronously set the value of the ViewModel property after render.
public System.Threading.Tasks.Task SetViewModel(dymaptic.GeoBlazor.Core.Components.CompassViewModel? value);
Parameters
value
CompassViewModel
The value to set.
Returns
CompassWidget.ValidateRequiredGeneratedChildren() Method
Validates source-generated child components.
public override void ValidateRequiredGeneratedChildren();
Implements ValidateRequiredGeneratedChildren()