ArcGIS Runtime SDK for WPF - Library Reference
LocalFeatureService Class
Members  Example  See Also 
ESRI.ArcGIS.Client.Local Namespace : LocalFeatureService Class

The LocalFeatureService class represents a Feature Service hosted by the LocalServer.

Object Model

LocalFeatureService ClassWorkspaceInfoCollection ClassWorkspaceInfo ClassEnvelope ClassEnvelope ClassSpatialReference Class

Syntax

Visual Basic (Declaration) 
Public NotInheritable Class LocalFeatureService 
   Inherits LocalMapService
C# 
public sealed class LocalFeatureService : LocalMapService 

Remarks

LocalFeatureServices form the basis for feature editing in conjunction with an instance of the ArcGISLocalFeatureLayer class. The feature service is just a map service with the Feature Access capability enabled. This capability allows the map service to expose feature geometries and their symbols in a way that is easy for the API to use and update. Unlike with map services, which have an ExportMap function to draw the map, visualization of feature services works completely from queries. The server returns the queried features to the client, then the client does the work of drawing the features in the feature layer.

Example

The following examples demonstrate how to define an ArcGISLocalFeatureLayer in code using the static GetServiceAsync:
C#Copy Code
// Create a new local feature service instance and supply an ArcGIS Map Package path as string.
LocalFeatureService.GetServiceAsync(@"Path to map package",
    localFeatureService =>
    {
        // Create a new local feature layer instance and provide the local feature service and a layer name.
        ArcGISLocalFeatureLayer arcGISLocalFeatureLayer
            = new ArcGISLocalFeatureLayer(localFeatureService, "Cities");
            
        // Set the ID.
        arcGISLocalFeatureLayer.ID = "Cities";
        
        // Add the local feature layer to the map. The map will handle the initialization of the layer.
        _map.Layers.Add(arcGISLocalFeatureLayer);
    });
VB.NETCopy Code
' Create a new local feature service instance and supply an ArcGIS Map Package path as string.
LocalFeatureService.GetServiceAsync("Path to map package",
    Function(localServiceDelegate)
        ' Create a new local feature layer instance and provide the local feature service and a layer name.
        Dim arcGISLocalFeatureLayer As New ArcGISLocalFeatureLayer(localServiceDelegate, "Cities")
        
        ' Set the ID.
        arcGISLocalFeatureLayer.ID = "Cities"
        
        ' Add the local feature layer to the map. The map will handle the initialization of the layer which 
        ' in turn will start the local feature service if required.
        _map.Layers.Add(arcGISLocalFeatureLayer)
        
    End Function)

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.Client.Local.LocalService
      ESRI.ArcGIS.Client.Local.LocalMapService
         ESRI.ArcGIS.Client.Local.LocalFeatureService

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.