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
<?xml version="1.0" encoding="utf-8" ?> <ContentPage x:Class="ArcGISRuntime.Samples.FeatureCollectionLayerFromQuery.FeatureCollectionLayerFromQuery" xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms" xmlns:mapping="clr-namespace:Esri.ArcGISRuntime.Mapping;assembly=Esri.ArcGISRuntime"> <Grid> <esriUI:MapView x:Name="MyMapView"/> </Grid> </ContentPage>