Array of network analysis layers of a particular analysis type.
[Visual Basic 6.0] Function GetNALayerNames(
ByVal layerType As esriNAServerLayerType _
)() As String
[Visual Basic .NET] Public Function GetNALayerNames ( _ ByVal layerType As esriNAServerLayerType _ ) As String[]
[C#] public String[] GetNALayerNames ( esriNAServerLayerType layerType );
[Java] public String[] getNALayerNames ( esriNAServerLayerType layerType ) throws IOException, AutomationException
[C++] HRESULT GetNALayerNames( esriNAServerLayerType layerType, NALayerNames* NALayerNames );
Parameters
layerType [in]
layerType is a parameter of type esriNAServerLayerType
NALayerNames [out, retval]
NALayerNames is a parameter of type
GetNALayerNames returns an array of names of NALayers of a given type. For example, you could use this method to find the names of all of the route analysis layers in the default map of the map server.
Example to retrieve all route network analysis layers associated to a MapServer Objects:
//connect to the server and get access to the server context for the MapServer objects
ServerConnection conn =
new ESRI.ArcGIS.Server.WebControls.ServerConnection("MyMachine",true);IServerObjectManager pSOM = conn.ServerObjectManager;
IServerContext pServerContext = pSOM.CreateServerContext("MyMapServerObjects", "MapServer");
// Get access to the MapServer and NAServer Interfaces
IMapServer pMapServer = pServerContext.ServerObject
as IMapServer;IServerObjectExtensionManager soex = pMapServer
as IServerObjectExtensionManager;IServerObjectExtension sext = soex.FindExtensionByName("NAServer");
INAServer naServer = sext
as INAServer;
// Retrieve the list of Routes NALayers for this MapServer objects
string[] naLayers = naServer.GetNALayerNames(ESRI.ArcGIS.NetworkAnalyst.esriNALayerType.esriNALayerRoute);