ArcGIS Runtime SDK for WPF - Library Reference
InitializeWithLocalService(QueryTask,String,String) Method
See Also 
ESRI.ArcGIS.Client.Tasks Namespace > QueryTaskLocalExtensions Class > InitializeWithLocalService Method : InitializeWithLocalService(QueryTask,String,String) Method

queryTask
The QueryTask to initialize.
path
A System.String representing the path to a Map Package from which the local map service will be started.
layerName
A System.String representing the name of the layer within the local map service.
Synchronously initializes the supplied QueryTask instance with a ESRI.ArcGIS.Client.Local.LocalMapService.UrlMapService based on the provided path to a Map Package.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function InitializeWithLocalService( _
   ByVal queryTask As QueryTask, _
   ByVal path As String, _
   ByVal layerName As String _
) As LocalMapService
C# 
public static LocalMapService InitializeWithLocalService( 
   QueryTask queryTask,
   string path,
   string layerName
)

Remarks

This method will reuse an existing local map service if one exists with the same properties or start a new one if none are found on the runtime local server.

Parameters

queryTask
The QueryTask to initialize.
path
A System.String representing the path to a Map Package from which the local map service will be started.
layerName
A System.String representing the name of the layer within the local map service.

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.