Edit and sync features

This sample demonstrates how to synchronize offline edits with a feature service.

Edit and sync features

Instructions

  1. Pan and zoom to the area you would like to download features for, ensuring that all features are within the rectangle.
  2. Tap the 'generate' button. This will start the process of generating the offline geodatabase.
  3. Tap on a point feature within the area of the generated geodatabase. Then tap on the screen (anywhere within the range of the local geodatabase) to move the point to that location.
  4. Tap the 'Sync Geodatabase' button to synchronize the changes back to the feature service. Note that the basemap for this sample is downloaded from ArcGIS Online automatically.

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.EditAndSyncFeatures.EditAndSyncFeatures"
             Title="Edit and Sync Features">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Label x:Name="MyHelpLabel" Grid.Row="0" Text="1. Click 'generate'" TextColor="Red" />
        <Button Text="Generate" Grid.Row="1" Clicked="GenerateButton_Clicked" x:Name="myGenerateButton" IsEnabled="False" />
        <Button Text="Synchronize" Grid.Row="2" Clicked="SyncButton_Click" IsEnabled="False" x:Name="mySyncButton" />
        <ProgressBar IsVisible="False" Grid.Row="3" x:Name="myProgressBar" MinimumHeightRequest="10" />
        <esriUI:MapView x:Name="myMapView"  Grid.Row="4" GeoViewTapped="GeoViewTapped" />
    </Grid>
</ContentPage>


In this topic
  1. Instructions
  2. Code