Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.48 KB

compass.md

File metadata and controls

53 lines (42 loc) · 1.48 KB

Compass

Show a compass direction for a MapView or SceneView. Resets the view orientation when tapped/clicked.

compass

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>