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

ArcGISLocalFeatureLayers are a special type of Graphics layer that allow you to display graphic features which consist of geometry and attributes.

Object Model

ArcGISLocalFeatureLayer Class

Syntax

Visual Basic (Declaration) 
Public Class ArcGISLocalFeatureLayer 
   Inherits ESRI.ArcGIS.Client.FeatureLayer
   Implements ESRI.ArcGIS.Client.IAttributionESRI.ArcGIS.Client.ILegendSupport 

Remarks

ArcGISLocalFeatureLayers require both a path to an ArcGIS map package and the name or numeric ID of a layer within that map package.

FeatureLayers provide a greater degree of interaction with features in the map and provide the basis for feature editing functionality.

Example

The following example demonstrates how to define an ArcGISLocalFeatureLayer in XAML: The following examples demonstrate how to define an ArcGISLocalFeatureLayer in code using the static GetServiceAsync:
XAMLCopy Code
<esri:Map x:Name="_map">              
  <esri:ArcGISLocalFeatureLayer ID="arcGISLocalFeatureLayer" LayerName="Cities" 
           Path="C:\Program Files (x86)\ArcGIS SDKs\WPF1.0\SDK\Samples\Data\MPKs\USCitiesStates.mpk"/>            
</esri:Map>
C#Copy Code
// Create a new local feature service instance and supply an ArcGIS Map Package path as string.
LocalFeatureService.GetServiceAsync(@"C:\Program Files (x86)\ArcGIS SDKs\WPF1.0\SDK\Samples\Data\MPKs\USCitiesStates.mpk",
    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("C:\Program Files (x86)\ArcGIS SDKs\WPF1.0\SDK\Samples\Data\MPKs\USCitiesStates.mpk",
    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
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         ESRI.ArcGIS.Client.Layer
            ESRI.ArcGIS.Client.GraphicsLayer
               ESRI.ArcGIS.Client.FeatureLayer
                  ESRI.ArcGIS.Client.Local.ArcGISLocalFeatureLayer

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.