View in MAUI UWP WPF WinUI View on GitHub
import InlineCode from "@esri-dx/starship-doc-components/components/InlineCode.astro";

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
    from a URL.
  2. Create a feature layer from the service feature table.
  3. Add the feature layer to your ArcGISMap using
    .

Relevant API

  • Basemap
  • FeatureLayer
  • Map
  • MapView
  • ServiceFeatureTable

Tags

feature table, layer, layers, service

Sample Code

FeatureLayerUrl.xaml FeatureLayerUrl.xaml FeatureLayerUrl.xaml.cs
<UserControl x:Class="ArcGIS.WinUI.Samples.FeatureLayerUrl.FeatureLayerUrl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
<Grid>
<esriUI:MapView x:Name="MyMapView" />
</Grid>
</UserControl>