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

Load a WFS feature table using an XML query.

Image of load WFS with XML query

Use case

Runtime

objects can’t represent all possible queries that can be made against a WFS feature service. For example, Runtime query parameters don’t support wildcard searches. You can provide queries as raw XML strings, allowing you to access query functionality not available with
.

How to use the sample

Run the sample and view the data loaded from the the WFS feature table.

How it works

  1. Create a
    and a
    to visualize the table.
  2. Set the feature request mode to
    .
  3. Call
    to populate the table with only those features returned by the XML query.

Relevant API

  • FeatureLayer
  • WfsFeatureTable
  • WfsFeatureTable.AxisOrder
  • WfsFeatureTable.PopulateFromServiceAsync

About the data

This service shows trees in downtown Seattle and the surrounding area. An XML-encoded

request is used to limit results to only trees of the genus Tilia.

For additional information, see the underlying service on ArcGIS Online.

Tags

feature, OGC, query, service, web, WFS, XML

Sample Code

WfsXmlQuery.xaml WfsXmlQuery.xaml WfsXmlQuery.xaml.cs
<UserControl x:Class="ArcGIS.WinUI.Samples.WfsXmlQuery.WfsXmlQuery"
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>