FRAMES | NO FRAMES
Network Layer
URL http://<networkservice-url>/<layerName>
Parent Resource Network Service

Description

The network layer resource represents a single network layer in a network analysis service published by ArcGIS Server. It provides basic information about the network layer such as its name, type, and network classes. Additionally, depending on the layer type, it provides different pieces of information as detailed in the examples.

a name="notes"/>

New in 10.1

Network layer resource now includes hasZ and hasM properties to indicate if it is Z or M aware.

Resource Hierarchy

Network Layer

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json

JSON Response Syntax (Route Layer)

{
"currentVersion": <currentVersion>, //Added at 10.0 SP1
"layerName" : "<layerName>",
"layerType" : "esriNAServerRouteLayer",
"impedance" : "<impedance>",
"useStartTime" : <true | false>,
"useTimeWindows" : <true | false>,
"preserveFirstStop" : <true | false>,
"preserveLastStop" : <true | false>,
"restrictUTurns" : "<restrictUTurns>",
"outputLineType" : "<outputLineType>",
"hasZ": <true|false>,
"hasM": <true|false>,
"useHierarchy" : <true | false>,
"ignoreInvalidLocations" : <true | false>,
"restrictions" : [ "<restriction1>", "<restriction2>" ],
"distanceUnits" : "<distanceUnits>",
"useTimeAttribute" : "<useTimeAttribute>",
"networkClasses" : [
{
"className" : "<className1>",
"fields" : [
{ "fieldName" : "<name11>", "defaultValue" : "<value11>", "candidateFields" : [ "<cf111>", "<cf112>" ] },
{ "fieldName" : "<name12>", "defaultValue" : "<value12>", "candidateFields" : [ "<cf121>", "<cf122>" ] }
]
},
{
"className" : "<className2>",
"fields" : [
{ "fieldName" : "<name21>", "defaultValue" : "<value21>", "candidateFields" : [ "<cf211>", "<cf212>" ] },
{ "fieldName" : "<name21>", "defaultValue" : "<value21>", "candidateFields" : [ "<cf221>", "<cf222>" ] }
]
}
]
}

JSON Response Example (Route Layer)

{
"currentVersion": 10.01,
"layerName" : "Route",
"layerType" : "esriNAServerRouteLayer",
"impedance" : "Minutes",
"useStartTime" : false,
"useTimeWindows" : false,
"preserveFirstStop" : true,
"preserveLastStop" : true,
"restrictUTurns" : "esriNFSBAllowBacktrack",
"outputLineType" : "esriNAOutputLineTrueShapeWithMeasure",
"useHierarchy" : true,
"ignoreInvalidLocations" : true,
"restrictions" : [ "Oneway" ],
"distanceUnits" : "esriNAUMiles",
"useTimeAttribute" : "Minutes",
"networkClasses" : [
{
"className" : "Stops",
"fields" : [
{
"fieldName" : "Name",
"defaultValue" : "",
"candidateFields" : ["Name","Address"]
},
{
"fieldName" : "Attr_Minutes",
"defaultValue" : "0.0",
"candidateFields" : ["Attr_Minutes","Minutes"]
}
]
}
]
}

JSON Response Syntax (Service Area Layer)

{
"currentVersion": <currentVersion>, //Added at 10.0 SP1
"layerName" : "<layerName>",
"layerType" : "esriNAServerServiceAreaLayer",
"impedance" : "<impedance>",
"defaultBreaks" : [ <defaultBreak1>, <defaultBreak2> ],
"travelDirection" : "<travelDirection>",
"restrictUTurns" : "<restrictUTurns>",
"ignoreInvalidLocations" : <true | false>,
"restrictions" : [ "<restriction1>", "<restriction2>" ],
"networkClasses" : [
{
"className" : "<className1>",
"fields" : [
{ "fieldName" : "<name11>", "defaultValue" : "<value11>", "candidateFields" : [ "<cf111>", "<cf112>" ] },
{ "fieldName" : "<name12>", "defaultValue" : "<value12>", "candidateFields" : [ "<cf121>", "<cf122>" ] }
]
},
{
"className" : "<className2>",
"fields" : [
{ "fieldName" : "<name21>", "defaultValue" : "<value21>", "candidateFields" : [ "<cf211>", "<cf212>" ] },
{ "fieldName" : "<name21>", "defaultValue" : "<value21>", "candidateFields" : [ "<cf221>", "<cf222>" ] }
]
}
]
}

JSON Response Example (Service Area Layer)

{
"currentVersion": 10.01,
"layerName" : "Service Area",
"layerType" : "esriNAServerServiceAreaLayer",
"impedance" : "Minutes",
"defaultBreaks" : [ 5.0 ],
"travelDirection" : "esriNATravelDirectionFromFacility",
"restrictUTurns" : "esriNFSBAllowBacktrack",
"ignoreInvalidLocations" : true,
"restrictions" : [],
"networkClasses" : [
{
"className" : "Barriers",
"fields" : [
{
"fieldName" : "Name",
"defaultValue" : "",
"candidateFields" : ["Name","Address"]
},
{
"fieldName" : "Attr_Minutes",
"defaultValue" : "0.0",
"candidateFields" : ["Attr_Minutes","Minutes"]
}
]
}
]
}

JSON Response Syntax (Closest Facility Layer)

{
"currentVersion": <currentVersion>, //Added at 10.0 SP1
"layerName" : "<layerName>",
"layerType" : "esriNAServerClosestFacilityLayer",
"impedance" : "<impedance>",
"defaultCutoffValue" : "<defaultCutoffValue>",
"facilityCount" : <facilityCount>,
"travelDirection" : "<travelDirection>",
"restrictUTurns" : "<restrictUTurns>",
"outputLineType" : "<outputLineType>",
"useHierarchy" : <true | false>,
"ignoreInvalidLocations" : <true | false>,
"restrictions" : [ "<restriction1>", "<restriction2>" ],
"distanceUnits" : "<distanceUnits>",
"useTimeAttribute" : "<useTimeAttribute>",
"networkClasses" : [
{
"className" : "<className1>",
"fields" : [
{ "fieldName" : "<name11>", "defaultValue" : "<value11>", "candidateFields" : [ "<cf111>", "<cf112>" ] },
{ "fieldName" : "<name12>", "defaultValue" : "<value12>", "candidateFields" : [ "<cf121>", "<cf122>" ] }
]
},
{
"className" : "<className2>",
"fields" : [
{ "fieldName" : "<name21>", "defaultValue" : "<value21>", "candidateFields" : [ "<cf211>", "<cf212>" ] },
{ "fieldName" : "<name21>", "defaultValue" : "<value21>", "candidateFields" : [ "<cf221>", "<cf222>" ] }
]
}
]
}

JSON Response Example (Closest Facility Layer)

{
"currentVersion": 10.01,
"layerName" : "Closest Facility",
"layerType" : "esriNAServerClosestFacilityLayer",
"impedance" : "Minutes",
"defaultCutoffValue" : "",
"facilityCount" : 3,
"travelDirection" : "esriNATravelDirectionToFacility",
"restrictUTurns" : "esriNFSBAllowBacktrack",
"outputLineType" : "esriNAOutputLineTrueShapeWithMeasure",
"useHierarchy" : true,
"ignoreInvalidLocations" : true,
"restrictions" : [ "Oneway" ],
"distanceUnits" : "esriNAUMiles",
"useTimeAttribute" : "Minutes",
"networkClasses" : [
{
"className" : "Facilities",
"fields" : [
{
"fieldName" : "Name",
"defaultValue" : "",
"candidateFields" : ["Name","Address"]
},
{
"fieldName" : "Attr_Minutes",
"defaultValue" : "0.0",
"candidateFields" : ["Attr_Minutes","Minutes"]
}
]
}
]
}