Skip to content

Directions API

Route Control Points

The Route Control Points are a collection of lat/lng pairs which are used to influence a regular route if provided in the route request.

Each Route Control Point (RCP) has the following attributes:

  • Location (lat,lng)
  • Radius of Influence (mile or km)
  • Weighting: Values > 1.0 cause the route to avoid the regions near the location. Values between 0.1 and 1.0 will tend to pull the route towards the region centered at the location. Weight values must lie between 0.1 and 100.0

Parameters

NameDescription
latLatitude
lngLongitude
radiusRadius of Influence (miles/km)
weightWeight value used to avoid specified location. Must lie between 0.1 and 100.0
FormatExample
Key/Value
pairs
&routeControlPoint=40.051795,-76.32552,2,3
&routeControlPoint=40.051795,-76.32552,2,3...

Route control point attributes are comma separated values and they must appear in a fixed order (i.e. latitude, longitude, radius, weight).
JSON
{
    "routeControlPointCollection": [
        {
            "lat": 40.051795,
            "lng": -76.32552,
            "weight": 5,
            "radius": 2
        },
        {
            "lat": ...
        },
        ...
    ]
}
XML
<routeControlPointCollection>
  <routeControlPoint>
    <latitude>40.051795</latitude>
    <longitude>-76.32552</longitude>
    <weight>3</weight>
    <radius>2</radius>
  </routeControlPoint>

  <routeControlPoint>
    ...
  </routeControlPoint>
</routeControlPointCollection>