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
The JavaScript code which sends the request and displays the result can be viewed here.
Parameters
In addition to the Advanced Routing Options and Parameters, the following parameters (route control point attributes) are sent as part of route request.
| Name | Description |
|---|---|
| lat | Latitude |
| lng | Longitude |
| radius | Radius of Influence (miles/km) |
| weight | Weight value used to avoid specified location. Must lie between 0.1 and 100.0 |
| Format | Example |
|---|---|
| kvp | &routeControlPoint=40.051795,-76.32552,2,3&routeControlPoint=40.051795,-76.32552,2,3... For kvp, 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>
|
Sample
| From: | ||
| To: | ||
| Route Type: | ||
| Unit: | ||
| Shape Format: | ||
| Generalize: | Ignored if "Shape Format" (above) is "[none]" |
|
| Input Format: | Uses "json=" or "xml=" if appropriate. |
|
| Route Control Point | ||||
| Latitude: | Longitude: | |||
| Weight: | Radius: | |||