Visual Basic (Declaration) | |
---|---|
Public Class ArcGISLocalDynamicMapServiceLayer Inherits ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer Implements ESRI.ArcGIS.Client.DynamicLayer.ILayerSupportsRotation, ESRI.ArcGIS.Client.IAttribution, ESRI.ArcGIS.Client.ILegendSupport, ESRI.ArcGIS.Client.ISublayerVisibilitySupport |
C# | |
---|---|
public class ArcGISLocalDynamicMapServiceLayer : ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer, ESRI.ArcGIS.Client.DynamicLayer.ILayerSupportsRotation, ESRI.ArcGIS.Client.IAttribution, ESRI.ArcGIS.Client.ILegendSupport, ESRI.ArcGIS.Client.ISublayerVisibilitySupport |
An ArcGISLocalDynamicMapServiceLayer allows you to work with a dynamic map service resource serving local data content exposed by the ArcGIS REST API. A dynamic map service generates images on the fly.
ArcGISLocalDynamicMapServiceLayer inherits from ArcGISDynamicMapServiceLayer and provides overloaded constructors, overridden methods, new event handlers and new properties for working with local data content.
ArcGISLocalDynamicMapServiceLayers can be created via one of the overloaded constructors or by setting the the Path property then explicitly calling the overridden Initialize method. In all cases, whether passed as a string in the constructor or used as the seed for a LocalMapService the, the fundamental element is a path to an ArcGIS map package.
The ArcGISLocalDynamicMapServiceLayer initialization will result in one of two events being raised, either ESRI.ArcGIS.Client.Layer.Initialized or ESRI.ArcGIS.Client.Layer.InitializationFailed. It is recommended that these events are handled in order to provide feedback to the user, particularly in the case of an initialization failure where the ESRI.ArcGIS.Client.Layer.InitializationFailure property will contain the Exception.
ArcGISDynamicMapServiceLayers are not shown at design time.
XAML | Copy Code |
---|---|
<esri:Map x:Name="_map"> <esri:ArcGISLocalDynamicMapServiceLayer ID="arcGISLocalDynamicMapServiceLayer" Path="C:\Program Files (x86)\ArcGIS SDKs\WPF1.0\SDK\Samples\Data\MPKs\USCitiesStates.mpk"/> </esri:Map> |
C# | Copy Code |
---|---|
// Create a new local map service instance and supply an ArcGIS map package path as string LocalMapService.GetServiceAsync(@"C:\Program Files (x86)\ArcGIS SDKs\WPF1.0\SDK\Samples\Data\MPKs\USCitiesStates.mpk", delegateService => { // Create a new local dynamic layer instance and provide the local map service ArcGISLocalDynamicMapServiceLayer arcGISLocalDynamicMapServiceLayer = new ArcGISLocalDynamicMapServiceLayer(delegateService); // Add the local dynamic layer to the map. The map will handle the initialization of the layer. _map.Layers.Add(arcGISLocalDynamicMapServiceLayer); }); |
VB.NET | Copy Code |
---|---|
' Create a new local map service instance and supply an ArcGIS map package path as string LocalMapService.GetServiceAsync("C:\Program Files (x86)\ArcGIS SDKs\WPF1.0\SDK\Samples\Data\MPKs\USCitiesStates.mpk", Function(delegateService) ' Create a new local dynamic layer instance and provide the local map service Dim arcGISLocalDynamicMapServiceLayer As New ArcGISLocalDynamicMapServiceLayer(delegateService) ' Add the local dynamic layer to the map. The map will handle the initialization of the layer which ' in turn will start the local map service if required. _map.Layers.Add(arcGISLocalDynamicMapServiceLayer) End Function) |
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
ESRI.ArcGIS.Client.Layer
ESRI.ArcGIS.Client.DynamicLayer
ESRI.ArcGIS.Client.DynamicMapServiceLayer
ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer
ESRI.ArcGIS.Client.Local.ArcGISLocalDynamicMapServiceLayer
Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8