Display a layer from a WFS service, requesting only features for the current extent.
Use case
WFS is an open standard with functionality similar to ArcGIS feature services. Runtime support for WFS allows you to interoperate with open systems, which are often used in inter-agency efforts, like those for disaster relief.
How to use the sample
Pan and zoom to see features within the current map extent.
How it works
- Create a
WfsFeatureTable
with a URL. - Create a
FeatureLayer
from the feature table and add it to the map. - Listen for the
MapView.NavigationCompleted
event to detect when the user has stopped navigating the map. - When the user is finished navigating, use
PopulateFromServiceAsync
to load the table with data for the current visible extent.
Relevant API
- FeatureLayer
- MapView.NavigationCompleted
- WfsFeatureTable
- WfsFeatureTable.PopulateFromServiceAsync
About the data
This service shows building footprints for downtown Seattle. For additional information, see the underlying service on ArcGIS Online.
Tags
browse, catalog, feature, interaction cache, layers, OGC, service, web, WFS
Sample Code
<UserControl
x:Class="ArcGIS.UWP.Samples.DisplayWfs.DisplayWfs"
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" />
<Border Style="{StaticResource BorderStyle}">
<StackPanel>
<TextBlock Text="Pan and zoom to see features."
HorizontalTextAlignment="Center"
FontWeight="SemiBold"/>
<ProgressRing x:Name="LoadingProgressBar"
IsActive="True"
Visibility="Collapsed" />
</StackPanel>
</Border>
</Grid>
</UserControl>