-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from mapbox/direction-doc
Added some documentation to the rest of directions doc
- Loading branch information
Showing
4 changed files
with
184 additions
and
24 deletions.
There are no files selected for viewing
38 changes: 35 additions & 3 deletions
38
libjava/lib/src/main/java/com/mapbox/services/directions/v4/DirectionsCriteria.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,52 @@ | ||
package com.mapbox.services.directions.v4; | ||
|
||
/** | ||
* Created by antonio on 1/30/16. | ||
* Constants used to customize the directions request. | ||
*/ | ||
@Deprecated | ||
public final class DirectionsCriteria { | ||
|
||
/** | ||
* For car and motorcycle routing. This profile shows the fastest routes by preferring | ||
* high-speed roads like highways. | ||
*/ | ||
public static final String PROFILE_DRIVING = "mapbox.driving"; | ||
|
||
/** | ||
* For pedestrian and hiking routing. This profile shows the shortest path by using sidewalks | ||
* and trails. | ||
*/ | ||
public static final String PROFILE_WALKING = "mapbox.walking"; | ||
|
||
/** | ||
* For bicycle routing. This profile shows routes that are short and safe for cyclist, avoiding | ||
* highways and preferring streets with bike lanes. | ||
*/ | ||
public static final String PROFILE_CYCLING = "mapbox.cycling"; | ||
|
||
/** | ||
* Format to return route instructions will be text. | ||
*/ | ||
public static final String INSTRUCTIONS_TEXT = "text"; | ||
|
||
/** | ||
* Format to return route instructions will be html. | ||
*/ | ||
public static final String INSTRUCTIONS_HTML = "html"; | ||
|
||
public static final String GEOMETRY_GEOJSON = "geojson"; | ||
/** | ||
* Format to return route geometry will be geojson. | ||
*/ | ||
public static final String GEOMETRY_GEOJSON = "geojson"; | ||
|
||
/** | ||
* Format to return route geometry will be encoded polyline. | ||
*/ | ||
public static final String GEOMETRY_POLYLINE = "polyline"; | ||
public static final String GEOMETRY_FALSE = "false"; | ||
|
||
/** | ||
* Use false to omit geometry from response. | ||
*/ | ||
public static final String GEOMETRY_FALSE = "false"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 43 additions & 13 deletions
56
libjava/lib/src/main/java/com/mapbox/services/directions/v5/DirectionsCriteria.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,73 @@ | ||
package com.mapbox.services.directions.v5; | ||
|
||
/** | ||
* Created by antonio on 3/4/16. | ||
* Constants used to customize the directions request. | ||
*/ | ||
public class DirectionsCriteria { | ||
|
||
public static final String PROFILE_DEFAULT_USER = "mapbox"; | ||
|
||
/** | ||
The profile parameter denotes the type of routing. Currently supported are: | ||
- mapbox/driving for car routing | ||
- mapbox/walking for pedestrian and hiking routing | ||
- mapbox/cycling for bicycle routing | ||
* For car and motorcycle routing. This profile shows the fastest routes by preferring | ||
* high-speed roads like highways. | ||
*/ | ||
public static final String PROFILE_DEFAULT_USER = "mapbox"; | ||
public static final String PROFILE_DRIVING = "driving"; | ||
|
||
/** | ||
* For pedestrian and hiking routing. This profile shows the shortest path by using sidewalks | ||
* and trails. | ||
*/ | ||
public static final String PROFILE_WALKING = "walking"; | ||
|
||
/** | ||
* For bicycle routing. This profile shows routes that are short and safe for cyclist, avoiding | ||
* highways and preferring streets with bike lanes. | ||
*/ | ||
public static final String PROFILE_CYCLING = "cycling"; | ||
|
||
/** | ||
* Format in which geometries are returned | ||
* Format to return route geometry will be encoded polyline. | ||
*/ | ||
public final static String GEOMETRY_POLYLINE = "polyline"; | ||
private final static String GEOMETRY_GEOJSON = "geojson"; // Unsupported | ||
|
||
/** | ||
* Add overview geometry either full, simplified to the highest zoom level it could be | ||
* display on, or not at all | ||
* Format to return route geometry will be geojson. Note that this isn't supported by the SDK. | ||
*/ | ||
private final static String GEOMETRY_GEOJSON = "geojson"; | ||
|
||
/** | ||
* A simplified version of the {@link #OVERVIEW_FULL} geometry. If not specified simplified is the default. | ||
*/ | ||
public final static String OVERVIEW_SIMPLIFIED = "simplified"; | ||
|
||
/** | ||
* The most detailed geometry available. | ||
*/ | ||
public final static String OVERVIEW_FULL = "full"; | ||
|
||
/** | ||
* No overview geometry. | ||
*/ | ||
public final static String OVERVIEW_FALSE = "false"; | ||
|
||
/** | ||
* On error, the server responds with an HTTP status code denoting the error, as explained in | ||
* the table below. The response body may include a JSON object with a message property, | ||
* explaining the error. | ||
* Server responds with no errors. | ||
*/ | ||
public final static String RESPONSE_OK = "Ok"; | ||
|
||
/** | ||
* There was no route found for the given query. | ||
*/ | ||
public final static String RESPONSE_NO_ROUTE = "NoRoute"; | ||
|
||
/** | ||
* Use a valid profile as described above. | ||
*/ | ||
public final static String RESPONSE_PROFILE_NOT_FOUND = "ProfileNotFound"; | ||
|
||
/** | ||
* The given request was not valid. | ||
*/ | ||
public final static String RESPONSE_INVALID_INPUT = "InvalidInput"; | ||
|
||
} |