Feature layer (feature service)

View inMAUIUWPWPFWinUIView on GitHub

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
9
10
11
12
13
14
<UserControl
    x:Class="ArcGIS.UWP.Samples.FeatureLayerUrl.FeatureLayerUrl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:esri="using:Esri.ArcGISRuntime"
    xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <esriUI: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.