Visual Basic (Declaration) | |
---|---|
Public Class ArcGISLocalFeatureLayer Inherits ESRI.ArcGIS.Client.FeatureLayer Implements ESRI.ArcGIS.Client.IAttribution, ESRI.ArcGIS.Client.ILegendSupport |
C# | |
---|---|
public class ArcGISLocalFeatureLayer : ESRI.ArcGIS.Client.FeatureLayer, ESRI.ArcGIS.Client.IAttribution, ESRI.ArcGIS.Client.ILegendSupport |
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.
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:
XAML | Copy 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.NET | 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", 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) |
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
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8