Click or drag to resize

FeatureTable Class

Represents a table from a database
Inheritance Hierarchy
SystemObject
  Esri.ArcGISRuntime.DataFeatureTable
    More...

Namespace:  Esri.ArcGISRuntime.Data
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
Syntax
public abstract class FeatureTable : INotifyPropertyChanged, 
	ILoadable

The FeatureTable type exposes the following members.

Properties
  NameDescription
Public propertyDisplayName
Gets or sets the table's display name.
Public propertyCode exampleExtent
Gets the geographic extent of features within the table.
Public propertyFeatureLayer Obsolete.
Gets the FeatureLayer this table is associated with, or created from, if any.
Public propertyCode exampleFields
Gets the fields of the feature table.
Public propertyCode exampleGeometryType
Gets the GeometryType of features in this table.
Public propertyHasGeometry
Gets a value indicating whether this table has geometry data.
Public propertyHasM
Gets a value indicating whether the shapefile geometries have M values.
Public propertyHasZ
Gets a value indicating whether the shapefile geometries have Z values.
Public propertyIsEditable
Gets a value indicating whether this table is editable.
Public propertyIsPopupEnabled
Gets or sets a value indicating whether the PopupDefinition defined is enabled.
Public propertyCode exampleLayer
Gets the layer this table is associated with, or created from, if any.
Public propertyLoadError
Gets the exception associated with a failed load. This property remains null if load is successful.
Public propertyCode exampleLoadStatus
Gets the current load status.
Public propertyNumberOfFeatures
Gets the number of features in this table.
Public propertyPopupDefinition
Gets or sets the pop-up definition for the table.
Public propertySpatialReference
Gets the SpatialReference of this table.
Public propertyCode exampleTableName
Gets the name of the table.
Top
Methods
  NameDescription
Public methodCode exampleAddFeatureAsync
Asynchronously adds new Feature to the table.
Public methodAddFeaturesAsync
Asynchronously adds the set of Features to the table.
Public methodCanAdd
Determines if a feature can be added to the table.
Public methodCancelLoad
Cancel the previous load operation,
Public methodCanDelete
Determines if the specified Feature can be deleted from the table.
Public methodCanEditGeometry
Determines if the table allows for the geometry field to be modified.
Public methodCanUpdate
Determines if the specified Feature can be updated on the table.
Public methodCode exampleCreateFeature
Creates a new feature.
Public methodCreateFeature(IEnumerableKeyValuePairString, Object, Geometry)
Creates a new feature with specified attributes and geometry.
Public methodCode exampleDeleteFeatureAsync
Asynchronously deletes new Feature from the table.
Public methodDeleteFeaturesAsync
Asynchronously deletes the set of Features from the table.
Public methodGetField
Gets the associated Field with specified field name.
Public methodCode exampleLoadAsync
Asynchronously initiates loading of this table.
Public methodCode exampleQueryExtentAsync
Asynchronously queries the extent of all features that satisfy the provided parameters.
Public methodCode exampleQueryFeatureCountAsync
Asynchronously queries the count of all features that satisfy the provided parameters.
Public methodCode exampleQueryFeaturesAsync(QueryParameters)
Asynchronously performs query against the table.
Public methodQueryFeaturesAsync(QueryParameters, CancellationToken)
Asynchronously performs query against the table.
Public methodCode exampleQueryStatisticsAsync
Calculates values for the requested statistics.
Public methodRetryLoadAsync
Asynchronously retries loading of this table table.
Public methodCode exampleUpdateFeatureAsync
Asynchronously updates new Feature on the table.
Public methodUpdateFeaturesAsync
Asynchronously updates the set of Features on the table.
Top
Events
  NameDescription
Public eventCode exampleLoaded
Occurs when the table is loaded.
Public eventCode exampleLoadStatusChanged
Occurs when the table LoadStatus is changed.
Public eventPropertyChanged
Occurs when a property value changes.
Top
Examples

UWP

Example Name: CustomDictionaryStyle

Use a custom dictionary style (.stylx) to symbolize features using a variety of attribute values.

Code example screen shot.

C#
// Copyright 2019 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
// language governing permissions and limitations under the License.

using ArcGISRuntime.Samples.Managers;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using System;

namespace ArcGISRuntime.UWP.Samples.CustomDictionaryStyle
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        name: "Custom dictionary style",
        category: "Symbology",
        description: "Use a custom dictionary style (.stylx) to symbolize features using a variety of attribute values.",
        instructions: "Pan and zoom the map to see the symbology from the custom dictionary style.",
        tags: new[] { "dictionary", "military", "renderer", "style", "stylx", "unique value", "visualization", "Featured" })]
    [ArcGISRuntime.Samples.Shared.Attributes.OfflineData("751138a2e0844e06853522d54103222a")]
    public partial class CustomDictionaryStyle
    {
        // Path for the restaurants style file.
        private readonly string _stylxPath = DataManager.GetDataFolder("751138a2e0844e06853522d54103222a", "Restaurant.stylx");

        // Uri for the restaurants feature service.
        private readonly Uri _restaurantUri = new Uri("https://services2.arcgis.com/ZQgQTuoyBrtmoGdP/arcgis/rest/services/Redlands_Restaurants/FeatureServer/0");

        public CustomDictionaryStyle()
        {
            InitializeComponent();
            Initialize();
        }

        private async void Initialize()
        {
            try
            {
                // Create a new map with a streets basemap.
                Map map = new Map(BasemapStyle.ArcGISStreets);

                // Create the restaurants layer and add it to the map.
                FeatureLayer restaurantLayer = new FeatureLayer(_restaurantUri);
                map.OperationalLayers.Add(restaurantLayer);

                // Load the feature table for the restaurants layer.
                await restaurantLayer.FeatureTable.LoadAsync();

                // Open the custom style file.
                DictionarySymbolStyle restaurantStyle = await DictionarySymbolStyle.CreateFromFileAsync(_stylxPath);

                // Create the dictionary renderer with the style file and the field overrides.
                DictionaryRenderer dictRenderer = new DictionaryRenderer(restaurantStyle);

                // Set the restaurant layer renderer to the dictionary renderer.
                restaurantLayer.Renderer = dictRenderer;

                // Set the map's initial extent to that of the restaurants.
                map.InitialViewpoint = new Viewpoint(restaurantLayer.FullExtent);

                // Set the map to the map view.
                MyMapView.Map = map;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
    }
}
XAML
<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.CustomDictionaryStyle.CustomDictionaryStyle"
    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">
    <esriUI:MapView x:Name="MyMapView" />
</UserControl>
Examples

Xamarin Forms UWP

Example Name: CustomDictionaryStyle

Use a custom dictionary style (.stylx) to symbolize features using a variety of attribute values.

Code example screen shot.

C#
// Copyright 2019 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
// language governing permissions and limitations under the License.

using ArcGISRuntime.Samples.Managers;
using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Symbology;
using System;
using Xamarin.Forms;

namespace ArcGISRuntimeXamarin.Samples.CustomDictionaryStyle
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        name: "Custom dictionary style",
        category: "Symbology",
        description: "Use a custom dictionary style (.stylx) to symbolize features using a variety of attribute values.",
        instructions: "Pan and zoom the map to see the symbology from the custom dictionary style.",
        tags: new[] { "dictionary", "military", "renderer", "style", "stylx", "unique value", "visualization", "Featured" })]
    [ArcGISRuntime.Samples.Shared.Attributes.OfflineData("751138a2e0844e06853522d54103222a")]
    public partial class CustomDictionaryStyle : ContentPage
    {
        // Path for the restaurants style file.
        private readonly string _stylxPath = DataManager.GetDataFolder("751138a2e0844e06853522d54103222a", "Restaurant.stylx");

        // Uri for the restaurants feature service.
        private readonly Uri _restaurantUri = new Uri("https://services2.arcgis.com/ZQgQTuoyBrtmoGdP/arcgis/rest/services/Redlands_Restaurants/FeatureServer/0");

        public CustomDictionaryStyle()
        {
            InitializeComponent();
            Initialize();
        }

        private async void Initialize()
        {
            try
            {
                // Create a new map with a streets basemap.
                Map map = new Map(BasemapStyle.ArcGISStreets);

                // Create the restaurants layer and add it to the map.
                FeatureLayer restaurantLayer = new FeatureLayer(_restaurantUri);
                map.OperationalLayers.Add(restaurantLayer);

                // Load the feature table for the restaurants layer.
                await restaurantLayer.FeatureTable.LoadAsync();

                // Open the custom style file.
                DictionarySymbolStyle restaurantStyle = await DictionarySymbolStyle.CreateFromFileAsync(_stylxPath);

                // Create the dictionary renderer with the style file and the field overrides.
                DictionaryRenderer dictRenderer = new DictionaryRenderer(restaurantStyle);

                // Set the restaurant layer renderer to the dictionary renderer.
                restaurantLayer.Renderer = dictRenderer;

                // Set the map's initial extent to that of the restaurants.
                map.InitialViewpoint = new Viewpoint(restaurantLayer.FullExtent);

                // Set the map to the map view.
                MyMapView.Map = map;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
    }
}
XAML
<ContentPage
    x:Class="ArcGISRuntimeXamarin.Samples.CustomDictionaryStyle.CustomDictionaryStyle"
    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">
    <esriUI:MapView x:Name="MyMapView" />
</ContentPage>
See Also
Inheritance Hierarchy
Additional Examples
Hyperlink to ExampleDescription
AddFeaturesAdd features to a feature layer.
BrowseWfsLayersBrowse a WFS service for layers and add them to the map.
ChangeFeatureLayerRendererChange the appearance of a feature layer with a renderer.
ClosestFacilityStaticFind routes from several locations to the respective closest facility.
CustomDictionaryStyleUse a custom dictionary style (.stylx) to symbolize features using a variety of attribute values.
DeleteFeaturesDelete features from an online feature service.
DisplayAnnotationDisplay annotation from a feature service URL.
DisplayDrawingStatusGet the draw status of your map view or scene view to know when all layers in the map or scene have finished drawing.
DisplayUtilityAssociationsCreate graphics for utility associations in a utility network.
DisplayWfsDisplay a layer from a WFS service, requesting only features for the current extent.
DownloadPreplannedMapTake a map offline using a preplanned map area.
EditAndSyncFeaturesSynchronize offline edits with a feature service.
EditBranchVersioningCreate, query and edit a specific server version using service geodatabase.
EditFeatureAttachmentsAdd, delete, and download attachments for features from a service.
EditFeatureLinkedAnnotationEdit feature attributes which are linked to annotation through an expression.
FeatureLayerDefinitionExpressionLimit the features displayed on a map with a definition expression.
FeatureLayerDictionaryRendererConvert features into graphics to show them with mil2525d symbols.
FeatureLayerExtrusionExtrude features based on their attributes.
FeatureLayerGeodatabaseDisplay features from a local geodatabase.
FeatureLayerGeoPackageDisplay features from a local GeoPackage.
FeatureLayerQueryFind features in a feature table which match an SQL query.
FeatureLayerRenderingModeMapRender features statically or dynamically by setting the feature layer rendering mode.
FeatureLayerRenderingModeSceneRender features in a scene statically or dynamically by setting the feature layer rendering mode.
FeatureLayerSelectionSelect features in a feature layer.
FeatureLayerShapefileOpen a shapefile stored on the device and display it as a feature layer with default symbology.
FindServiceAreasForMultipleFacilitiesFind the service areas of several facilities from a feature service.
GenerateGeodatabaseGenerate a local geodatabase from an online feature service.
GenerateOfflineMapWithOverridesTake a web map offline with additional options for each layer.
GeodatabaseTransactionsUse transactions to manage how changes are committed to a geodatabase.
ListRelatedFeaturesList features related to the selected feature.
PerformValveIsolationTraceRun a filtered trace to locate operable features that will isolate an area from the flow of network resources.
QueryFeatureCountAndExtentZoom to features matching a query and count the features in the current visible extent.
ReadGeoPackageAdd rasters and feature tables from a GeoPackage to a map.
ReadShapefileMetadataRead a shapefile and display its metadata.
RenderUniqueValuesRender features in a layer using a distinct symbol for each unique attribute value.
ServiceFeatureTableCacheDisplay a feature layer from a service using the **on interaction cache** feature request mode.
ServiceFeatureTableManualCacheDisplay a feature layer from a service using the **manual cache** feature request mode.
ServiceFeatureTableNoCacheDisplay a feature layer from a service using the **no cache** feature request mode.
ShowLabelsOnLayerDisplay custom labels on a feature layer.
StatisticalQueryQuery a table to get aggregated statistics back for a specific field.
StatsQueryGroupAndSortQuery a feature table for statistics, grouping and sorting by different fields.
SymbolizeShapefileDisplay a shapefile with custom symbology.
TimeBasedQueryQuery data using a time extent.
TraceUtilityNetworkDiscover connected features in a utility network using connected, subnetwork, upstream, and downstream traces.
UpdateAttributesUpdate feature attributes in an online feature service.
UpdateGeometriesUpdate a feature's location in an online feature service.
WfsXmlQueryLoad a WFS feature table using an XML query.