Class LocalMapService
The LocalMapService class represents a map service hosted by the LocalServer.
Namespace: Esri.ArcGISRuntime.LocalServices
Assembly: Esri.ArcGISRuntime.LocalServices.dll
Syntax
public class LocalMapService : LocalService
Remarks
A local map service provides access to maps, features, and attribute data contained within a Map Package. Local map services are typically used to display operational or business data on top of a tiled basemap layer. Map images from local map services are dynamically rendered from the data with each request (e.g. when the user pans the map). Local map services do not support caching in the same way as other server-based map services. To use local cached maps in your application you should use the ArcGISLocalTiledLayer class. Local map services have built-in capabilities that allow each layer's behavior and appearance to be changed dynamically. These dynamic layers can increase the amount of interaction that users are able to have with maps within your application. For more information see the ArcGISDynamicMapServiceLayer class documentation.
Local map services don't always need to display images. You can create a local map service for the purpose of returning a set of features to work within your application. You retrieve these features through tasks that you add to your application. For example, you might want to query a map service and display the resulting features as graphics in the map. Local map services always have their Query and Data operations enabled in contrast to map services hosted by ArcGIS for Server where these operations can be explicitly enabled or disabled by the server administrator.
To start a LocalMapService you can either create a new instance of a LocalMapService object via the default constructor then set the path property or use the overloaded constructor. Once the path property has been set by either approach above, the StartAsync() method should be called to start the LocalMapService which will be hosted by the LocalServer. The Status property can be checked to determine the LocalServiceStatus state.
Finally, there is one other convenience method for obtaining a LocalMapService object. Based on the supplied path to a Map Package the GetServiceAsyncTask method will either start a new LocalMapService or return a reference to an existing LocalMapService if one has previously been created for that particular Map Package resource with the same service properties.
Constructors
Name | Description |
---|---|
LocalMapService(String) | Initializes a new instance of the LocalMapService class based on the provided path property. |
Properties
Name | Description |
---|---|
MaxRecords | Gets or sets the maximum number of records that can be returned by the LocalMapService in response to a query, find, or identify operation. |
Url | Gets the Url of the local map service. |
Methods
Name | Description |
---|---|
GetDynamicWorkspaces() | Returns the list of this service's dynamic workspaces. |
SetDynamicWorkspaces(IEnumerable<DynamicWorkspace>) | Sets the dynamic workspaces for this service. |
StartAsync() | Asynchronously creates a LocalMapService based on the Map Package referenced by the Path property. |
StartAsync(CancellationToken) | Asynchronously creates a LocalMapService based on the Map Package referenced by the Path property. |
ToString() | Gets the path to the Map Package on which the LocalMapService is based. |
Applies to
Target | Versions |
---|---|
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.0 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.7 - 100.12 |