Compass
Show a compass direction for a MapView
or SceneView
. Resets the view orientation when tapped/clicked.
Features
- Supports binding to a
GeoView
. - Can be configured to hide itself automatically when the heading is 0 via the
AutoHide
property. - Allows display of a manually-set heading via the
Heading
property.
Usage
.NET MAUI:
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
<esri:MapView x:Name="MyMapView" />
<esri:Compass Margin="15"
AutoHide="False"
GeoView="{x:Reference MyMapView}"
HeightRequest="50"
WidthRequest="50" />
</Grid>
UWP/WinUI:
<Grid xmlns:esri="using:Esri.ArcGISRuntime.UI.Controls"
xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls">
<esri:MapView x:Name="MyMapView" />
<toolkit:Compass Width="50"
Height="50"
Margin="15"
AutoHide="False"
GeoView="{Binding ElementName=MyMapView}" />
</Grid>
WPF:
<Grid xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
<esri:MapView x:Name="MyMapView" />
<esri:Compass Width="50"
Height="50"
Margin="15"
AutoHide="False"
GeoView="{Binding ElementName=MyMapView}" />
</Grid>