Feature layer query

This sample demonstrates how to query a feature layer via feature table.

FeatureLayer query

Instructions

The sample provides a search bar on the top, where you can input the name of a US State. When you hit search the app performs a query on the feature table and based on the result either highlights the state geometry or provides an error.

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.FeatureLayerQuery.FeatureLayerQuery">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <StackLayout Orientation="Vertical">
      <Entry x:Name="queryEntry" Text="New York"/>
      <Button Text="Query" Clicked="OnQueryClicked"/>
    </StackLayout>
    <esriUI:MapView x:Name="myMapView"  Grid.Row="1"/>
  </Grid>
</ContentPage>


In this topic
  1. Instructions
  2. Code