Skip to content

Commit 961dc7c

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add TAXI travel mode and PolylineEncoding.
PiperOrigin-RevId: 364401367
1 parent d6b4fb3 commit 961dc7c

4 files changed

Lines changed: 33 additions & 16 deletions

File tree

google/maps/routes/v1/compute_routes_request.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ message ComputeRoutesRequest {
5959
// Optional. Specifies your preference for the quality of the polyline.
6060
PolylineQuality polyline_quality = 6;
6161

62+
// Optional. Specifies the preferred encoding for the polyline.
63+
PolylineEncoding polyline_encoding = 12;
64+
6265
// Optional. The departure time. If you don't set this value, then this value
6366
// defaults to the time that you made the request. If you set this value to a
6467
// time that has already occurred, then the request fails.
@@ -104,6 +107,10 @@ enum RouteTravelMode {
104107
// Two-wheeled, motorized vehicle. For example, motorcycle. Note that this
105108
// differs from the `BICYCLE` travel mode which covers human-powered mode.
106109
TWO_WHEELER = 4;
110+
111+
// Travel by licensed taxi, which may allow the vehicle to travel on
112+
// designated taxi lanes in some areas.
113+
TAXI = 5;
107114
}
108115

109116
// A set of values that specify factors to take into consideration when

google/maps/routes/v1/polyline.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,17 @@ enum PolylineQuality {
5757
// `HIGH_QUALITY` option.
5858
OVERVIEW = 2;
5959
}
60+
61+
// Specifies the preferred type of polyline to be returned.
62+
enum PolylineEncoding {
63+
// No polyline type preference specified. Defaults to `ENCODED_POLYLINE`.
64+
POLYLINE_ENCODING_UNSPECIFIED = 0;
65+
66+
// Specifies a polyline encoded using the [polyline encoding
67+
// algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
68+
ENCODED_POLYLINE = 1;
69+
70+
// Specifies a polyline using the [GeoJSON LineString
71+
// format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
72+
GEO_JSON_LINESTRING = 2;
73+
}

google/maps/routes/v1/route.proto

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ message RouteTravelAdvisory {
9191

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

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

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

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

@@ -327,11 +327,11 @@ message SpeedReadingInterval {
327327
}
328328

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

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

337337
// Traffic speed in this interval.

google/maps/routes/v1/route_service.proto

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ option php_namespace = "Google\\Maps\\Routes\\V1";
3535
// The Routes Preferred API.
3636
service RoutesPreferred {
3737
option (google.api.default_host) = "routespreferred.googleapis.com";
38-
option (google.api.oauth_scopes) =
39-
"https://www.googleapis.com/auth/maps-platform.routespreferred";
38+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/maps-platform.routespreferred";
4039

4140
// Returns the primary route along with optional alternate routes, given a set
4241
// of terminal and intermediate waypoints.
@@ -78,8 +77,6 @@ service RoutesPreferred {
7877
post: "/v1:computeRoutes"
7978
body: "*"
8079
};
81-
82-
option (google.api.method_signature) = "origin,destination";
8380
}
8481

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

0 commit comments

Comments
 (0)