Map rotation

This sample demonstrates how to rotate a map.

Rotate the map

Instructions

Use the available slider to dictate the number of degrees the map is rotated

Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"             
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
             xmlns:mapping="clr-namespace:Esri.ArcGISRuntime.Mapping;assembly=Esri.ArcGISRuntime" 
             x:Class="ArcGISRuntimeXamarin.Samples.MapRotation.MapRotation">
  <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="auto" />
    <RowDefinition Height="*" />
  </Grid.RowDefinitions>
    <StackLayout x:Name="MyStackLayout" Grid.Row="0">
        <Slider x:Name="MySlider" Minimum="0" Maximum="180" Value="0" ValueChanged="MySlider_ValueChanged" WidthRequest="300"/>
        <Label x:Name="MyLabel" Text=" " />
    </StackLayout>
    <esriUI:MapView x:Name="MyMapView" Grid.Row="1"/>
  </Grid>
</ContentPage>


In this topic
  1. Instructions
  2. Code