Visual Basic (Declaration) | |
---|---|
Public NotInheritable Class LocalFeatureService Inherits LocalMapService |
C# | |
---|---|
public sealed class LocalFeatureService : LocalMapService |
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.
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.NET | Copy 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) |
System.Object
ESRI.ArcGIS.Client.Local.LocalService
ESRI.ArcGIS.Client.Local.LocalMapService
ESRI.ArcGIS.Client.Local.LocalFeatureService
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8