Feature collection layer (query)
Create a feature collection layer to show a query result from a service feature table.
Consider a national wireless telecommunications company who wants to improve connectivity within areas of poor coverage. Their cell towers, cell tower radii and state boundaries data are held within service feature tables, which can be queried for states that don't meet a certain threshold of coverage. The query result can be used to create and display a single feature collection layer for analysis of areas requiring improved coverage.
When launched, this sample displays a map with point features as a feature collection layer. Pan and zoom to explore the map.
- Perform a query using the
QueryFeaturesAsync()method on a
- Instantiate a
FeatureCollectionTablewith the result of the query.
- Create a
FeatureCollectionand add the feature collection table to it.
- Create a
FeatureCollectionLayerfrom the feature collection.
- Add the feature collection layer to the map's
This application utilizes data from the wildfire feature service. It loads at full extent with features indicating wildfire response point features across the world.
layer, query, search, table
<UserControl x:Class="ArcGISRuntime.WinUI.Samples.FeatureCollectionLayerFromQuery.FeatureCollectionLayerFromQuery" 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>