Skip to content

Commit

Permalink
feat: Add TAXI travel mode and PolylineEncoding.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 364401367
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 22, 2021
1 parent d6b4fb3 commit 961dc7c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 16 deletions.
7 changes: 7 additions & 0 deletions google/maps/routes/v1/compute_routes_request.proto
Expand Up @@ -59,6 +59,9 @@ message ComputeRoutesRequest {
// Optional. Specifies your preference for the quality of the polyline.
PolylineQuality polyline_quality = 6;

// Optional. Specifies the preferred encoding for the polyline.
PolylineEncoding polyline_encoding = 12;

// Optional. The departure time. If you don't set this value, then this value
// defaults to the time that you made the request. If you set this value to a
// time that has already occurred, then the request fails.
Expand Down Expand Up @@ -104,6 +107,10 @@ enum RouteTravelMode {
// Two-wheeled, motorized vehicle. For example, motorcycle. Note that this
// differs from the `BICYCLE` travel mode which covers human-powered mode.
TWO_WHEELER = 4;

// Travel by licensed taxi, which may allow the vehicle to travel on
// designated taxi lanes in some areas.
TAXI = 5;
}

// A set of values that specify factors to take into consideration when
Expand Down
14 changes: 14 additions & 0 deletions google/maps/routes/v1/polyline.proto
Expand Up @@ -57,3 +57,17 @@ enum PolylineQuality {
// `HIGH_QUALITY` option.
OVERVIEW = 2;
}

// Specifies the preferred type of polyline to be returned.
enum PolylineEncoding {
// No polyline type preference specified. Defaults to `ENCODED_POLYLINE`.
POLYLINE_ENCODING_UNSPECIFIED = 0;

// Specifies a polyline encoded using the [polyline encoding
// algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
ENCODED_POLYLINE = 1;

// Specifies a polyline using the [GeoJSON LineString
// format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
GEO_JSON_LINESTRING = 2;
}
20 changes: 10 additions & 10 deletions google/maps/routes/v1/route.proto
Expand Up @@ -91,8 +91,8 @@ message RouteTravelAdvisory {

// Speed reading intervals detailing traffic density. Applicable in case of
// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
// The intervals cover the entire polyline of the route without overlaps, i.e.
// the start point of a given interval coincides with the end point of the
// The intervals cover the entire polyline of the route without overlap.
// The start point of a specified interval is the same as the end point of the
// preceding interval.
//
// Example:
Expand All @@ -114,9 +114,9 @@ message RouteLegTravelAdvisory {

// Speed reading intervals detailing traffic density. Applicable in case of
// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
// The intervals cover the entire polyline of the RouteLg without overlaps,
// i.e. the start point of a given interval coincides with the end point of
// the preceding interval.
// The intervals cover the entire polyline of the RouteLg without overlap.
// The start point of a specified interval is the same as the end point of the
// preceding interval.
//
// Example:
//
Expand All @@ -126,12 +126,12 @@ message RouteLegTravelAdvisory {
}

// Encapsulates the additional information that the user should be informed
// about, such as possible traffic zone restriction etc. on a leg step.
// about, such as possible traffic zone restriction on a leg step.
message RouteLegStepTravelAdvisory {
// Speed reading intervals detailing traffic density. Applicable in case of
// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
// The intervals cover the entire polyline of the RouteLegStep without
// overlaps, i.e. the start point of a given interval coincides with the end
// overlap. The start point of a specified interval is the same as the end
// point of the preceding interval.
//
// Example:
Expand Down Expand Up @@ -232,7 +232,7 @@ message RouteLegStep {
NavigationInstruction navigation_instruction = 6;

// Encapsulates the additional information that the user should be informed
// about, such as possible traffic zone restriction etc. on a leg step.
// about, such as possible traffic zone restriction on a leg step.
RouteLegStepTravelAdvisory travel_advisory = 7;
}

Expand Down Expand Up @@ -327,11 +327,11 @@ message SpeedReadingInterval {
}

// The starting index of this interval in the polyline.
// In JSON, when the index is 0, the field will appear to be unpopulated.
// In JSON, when the index is 0, the field appears to be unpopulated.
int32 start_polyline_point_index = 1;

// The ending index of this interval in the polyline.
// In JSON, when the index is 0, the field will appear to be unpopulated.
// In JSON, when the index is 0, the field appears to be unpopulated.
int32 end_polyline_point_index = 2;

// Traffic speed in this interval.
Expand Down
8 changes: 2 additions & 6 deletions google/maps/routes/v1/route_service.proto
Expand Up @@ -35,8 +35,7 @@ option php_namespace = "Google\\Maps\\Routes\\V1";
// The Routes Preferred API.
service RoutesPreferred {
option (google.api.default_host) = "routespreferred.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/maps-platform.routespreferred";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/maps-platform.routespreferred";

// Returns the primary route along with optional alternate routes, given a set
// of terminal and intermediate waypoints.
Expand Down Expand Up @@ -78,8 +77,6 @@ service RoutesPreferred {
post: "/v1:computeRoutes"
body: "*"
};

option (google.api.method_signature) = "origin,destination";
}

// Takes in a list of origins and destinations and returns a stream containing
Expand Down Expand Up @@ -117,8 +114,7 @@ service RoutesPreferred {
// be automatically included in the response.
// * Selecting only the fields that you need results in a smaller response
// size, and thus higher network throughput.
rpc ComputeRouteMatrix(ComputeRouteMatrixRequest)
returns (stream RouteMatrixElement) {
rpc ComputeRouteMatrix(ComputeRouteMatrixRequest) returns (stream RouteMatrixElement) {
option (google.api.http) = {
post: "/v1:computeRouteMatrix"
body: "*"
Expand Down

0 comments on commit 961dc7c

Please sign in to comment.