Visual Basic (Declaration) | |
---|---|
Public Class FeatureLayer Inherits MobileServiceLayer Implements ILayer |
C# | |
---|---|
public class FeatureLayer : MobileServiceLayer, ILayer |
Represents supported vector layers retrieved from the map document and stored in the MobileService. To check the geometry type of a FeatureLayer, use GeometryType property.
GetDataTable method will let you access the FeatureDataTable providing editing capabilities such as adding a feature, deleting a feature, or updating attributes. For more details, see FeatureDataTable.
FeatureLayer class also provides the GetDataReader method to get you access to a forward-only FeatureDataReader from where you can retrieve each data row. See FeatureDataReader.
The GetFeatureCount method returns the number of features based on the criteria you specified, while GetEditCount method will return the number of edited features in the feature layer. SaveEdits method allows you to push all edits made to FeatureDataTable back to MobileService. Alternatively, you could also use FeatureDataTable.SaveEditsInFeatureLayer method to perform similar operation. To cancel edits, use CancelEdits or CancelAllEdits.
From FeatureLayer, you also have access to column information associated with the FeatureLayer. The Columns property will gain you access to the Columns collection where properties for each column is available. The Columns collection is not ordered, so you need to access your data using the column or field name. Geometry, Fid and Display columns are accessible by either column name (GeometryColumnName, FidColumnName, DisplayColumnName) or column index (GeometryColumnIndex, FidColumnIndex, DisplayColumnIndex).
If the feature layers are stored in Geodatabases, you can get domain for a specific field and subtype code by calling GetDomain method. GetSubtypes will return the subtype data table as defined in the Geodatabase.
ESRI.ArcGIS.Mobile.Layer
ESRI.ArcGIS.Mobile.MobileServices.MobileCacheLayer
ESRI.ArcGIS.Mobile.MobileServices.MobileServiceLayer
ESRI.ArcGIS.Mobile.MobileServices.FeatureLayer
ESRI.ArcGIS.Mobile.MobileServices.AnnotationLayer
Requirements
Namespace: ESRI.ArcGIS.Mobile.MobileServices
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
Assembly: ESRI.ArcGIS.Mobile (in ESRI.ArcGIS.Mobile.dll)