Retrieve Travel Modes

Description

The retrieveTravelModes operation is performed on a network layer resource.

It provides a dynamic mechanism for a user to identify all the valid travel modes that have been defined on the network dataset or in the portal if the GIS server is federated.

Request Parameters

Parameter

Details

f

Description: The response format. The default response format is html.

Values: html | json

Example Usage

Example 1:http://<my server>:6080/arcgis/rest/services/<service name>/NAServer/Route/retrieveTravelModes?f=pjson

JSON Response Syntax

{
 "currentVersion": <currentVersion>,
 "defaultTravelMode": "<id>",
 "supportedTravelModes": [
  {
   "name": "<name1>",
   "id": "<id1>",
   "type": "<travel mode type>",
   "description": "<description1>",
   "timeAttributeName": "<timeAttributeName>",
   "distanceAttributeName": "<distanceAttributeName>",
   "impedanceAttributeName": "<impedanceAttributeName>",
   "restrictionAttributeNames": [
    "<restrictionAttributeName1>",
    "<restrictionAttributeName2>"
   ],
   "attributeParameterValues": [
    {
     "attributeName": "<attributeName1>",
     "parameterName": "<parameterName>",
     "value": "<parameterUsageType>"
    },
    {
     "attributeName": "<attributeName2>",
     "parameterName": "<parameterName>",
     "value": "<parameterUsageType>"
    }
   ],
   "useHierarchy": <true,false>,
   "uturnAtJunctions": "uturnsAtJunctions",
   "simplificationTolerance": <distance>,
   "simplificationToleranceUnits": "<esriUnits>"
  },
  {
   "name": "<name2>",
   "id": "<id2>",
   "type": "<travel mode type>",
   "description": "<description2>",
   "timeAttributeName": "<timeAttributeName>",
   "distanceAttributeName": "<distanceAttributeName>",
   "impedanceAttributeName": "<impedanceAttributeName>",
   "restrictionAttributeNames": [
    "<restrictionAttributeName1>",
    "<restrictionAttributeName2>"
   ],
   "attributeParameterValues": [
    {
     "attributeName": "<attributeName1>",
     "parameterName": "<parameterName>",
     "value": "<parameterUsageType>"
    },
    {
     "attributeName": "<attributeName2>",
     "parameterName": "<parameterName>",
     "value": "<parameterUsageType>"
    }
   ],
   "useHierarchy": <true,false>,
   "uturnAtJunctions": "uturnsAtJunctions",
   "simplificationTolerance": <distance>,
   "simplificationToleranceUnits": "<esriUnits>"
  }
 ]
}

JSON Response Example

{
 "currentVersion": 10.4,
 "defaultTravelMode": "1",
 "supportedTravelModes": [
  {
   "name": "Driving Time",
   "id": "1",
   "type": "AUTOMOBILE",
   "description": "Finds the best route in a car minimizing time.",
   "timeAttributeName": "TravelTime",
   "distanceAttributeName": "Meters",
   "impedanceAttributeName": "TravelTime",
   "restrictionAttributeNames": [
    "Oneway",
    "Driving an Automobile"
   ],
   "attributeParameterValues": [
    {
     "attributeName": "Oneway",
     "parameterName": "Restriction Usage",
     "value": "Prohibited"
    },
    {
     "attributeName": "Driving an Automobile",
     "parameterName": "Restriction Usage",
     "value": "Prohibited"
    },
    {
     "attributeName": "Driving a Truck",
     "parameterName": "Restriction Usage",
     "value": "Prohibited"
    }
   ],
   "useHierarchy": true,
   "uturnAtJunctions": "esriNFSBAtDeadEndsAndIntersections",
   "simplificationTolerance": 10,
   "simplificationToleranceUnits": "esriMeters"
  },
  {
   "name": "Trucking Distance",
   "id": "2",
   "type": "TRUCK",
   "description": "Finds the best route in a truck minimizing distance.",
   "timeAttributeName": "Minutes",
   "distanceAttributeName": "Meters",
   "impedanceAttributeName": "Meters",
   "restrictionAttributeNames": [
    "Driving a Truck",
    "Oneway"
   ],
   "attributeParameterValues": [
    {
     "attributeName": "Oneway",
     "parameterName": "Restriction Usage",
     "value": "Prohibited"
    },
    {
     "attributeName": "Driving an Automobile",
     "parameterName": "Restriction Usage",
     "value": "Prohibited"
    },
    {
     "attributeName": "Driving a Truck",
     "parameterName": "Restriction Usage",
     "value": "Prohibited"
    }
   ],
   "useHierarchy": true,
   "uturnAtJunctions": "esriNFSBNoBacktrack",
   "simplificationTolerance": 10,
   "simplificationToleranceUnits": "esriMeters"
  }
 ]
}

3/3/2017