Class DirectionResource
A directions request.
Inherited Members
Namespace:Mapbox.Directions
Assembly:Mapbox.Directions.dll
Syntax
public class DirectionResource : Resource
Constructors
DirectionResource(Vector2d[], RoutingProfile)
Initializes a new instance of the DirectionResource class.
Declaration
public DirectionResource(Vector2d[] coordinates, RoutingProfile profile)
Parameters
Type | Name | Description |
---|---|---|
Vector2d[] | coordinates | Array of LatLng points along route, between 2 and 25 elements in length. |
RoutingProfile | profile | A routing profile, RoutingProfile for all profile options. |
Properties
Alternatives
Gets or sets the alternative option. Controls whether direction request should return alternative routes.
Declaration
public bool ? Alternatives { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
ApiEndpoint
Gets the API endpoint as a partial URL path.
Declaration
public override string ApiEndpoint { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Bearings
Gets or sets the bearing option. An array of bearing filters. Each filter is composed of a bearing as decimal degrees clockwise between 0 and 360, and a range of variation from the bearing as decimal degrees between 0 and 180.
Declaration
public BearingFilter[] Bearings { get; set; }
Property Value
Type | Description |
---|---|
BearingFilter[] |
ContinueStraight
Gets or sets the continue_straight option. Controls whether to route will continue in same direction of travel or if route may continue in opposite direction of travel at intermediate waypoints.
Declaration
public bool ? ContinueStraight { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Coordinates
Gets or sets the coordinates. Array of LatLng points along route, between 2 and 25 elements in length.
Declaration
public Vector2d[] Coordinates { get; set; }
Property Value
Type | Description |
---|---|
Vector2d[] |
Overview
Gets or sets the overview option. See Overview for all overview options.
Declaration
public Overview Overview { get; set; }
Property Value
Type | Description |
---|---|
Overview |
Radiuses
Gets or sets the radiuses option. Controls maximum distance in meters that each coordinate is allowed to move when snapped to a nearby road segment.
Declaration
public double[] Radiuses { get; set; }
Property Value
Type | Description |
---|---|
System.Double[] |
RoutingProfile
Gets or sets the routing profile, RoutingProfile for all profile options.
Declaration
public RoutingProfile RoutingProfile { get; set; }
Property Value
Type | Description |
---|---|
RoutingProfile |
Steps
Gets or sets the steps option. Controls whether to return steps and turn-by-turn instructions.
Declaration
public bool ? Steps { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
Methods
GetUrl()
Gets the URL string.
Declaration
public override string GetUrl()
Returns
Type | Description |
---|---|
System.String | The URL string. |