Feature layer (feature service)

View inAndroidFormsUWPWPFWinUIiOSView on GitHubSample viewer app

Show features from an online feature service.

Image of feature layer feature service

Use case

Feature services are useful for sharing vector GIS data with clients so that individual features can be queried, displayed, and edited.

How to use the sample

Run the sample and view the feature service as an operational layer on top of the basemap. Zoom and pan around the map to see the features in greater detail.

How it works

  1. Create a ServiceFeatureTable from a URL.
  2. Create a feature layer from the service feature table.
  3. Add the feature layer to your ArcGISMap using Map.OperationalLayers.Add(FeatureLayer).

Relevant API

  • Basemap
  • FeatureLayer
  • Map
  • MapView
  • ServiceFeatureTable

Tags

feature table, layer, layers, service

Sample Code

FeatureLayerUrl.xamlFeatureLayerUrl.xamlFeatureLayerUrl.xaml.cs
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
<UserControl x:Class="ArcGISRuntime.WPF.Samples.FeatureLayerUrl.FeatureLayerUrl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid>
        <esri:MapView x:Name="MyMapView" />
    </Grid>
</UserControl>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.