Skip to content

Commit 5a11760

Browse files
Google APIscopybara-github
Google APIs
authored andcommitted
feat: Add Traffic data to the leg and step level.
PiperOrigin-RevId: 357215334
1 parent c059c46 commit 5a11760

12 files changed

+49
-15
lines changed

google/maps/routes/v1/compute_route_matrix_request.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/compute_routes_request.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/compute_routes_response.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/fallback_info.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/polyline.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/route.proto

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -90,13 +90,15 @@ message RouteTravelAdvisory {
9090
TollInfo toll_info = 2;
9191

9292
// Speed reading intervals detailing traffic density. Applicable in case of
93-
// TRAFFIC_AWARE and TRAFFIC_AWARE_OPTIMAL routing preferences.
93+
// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
9494
// The intervals cover the entire polyline of the route without overlaps, i.e.
9595
// the start point of a given interval coincides with the end point of the
9696
// preceding interval.
97+
//
9798
// Example:
98-
// polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
99-
// speed_reading_intervals: [A,C), [C,D), [D,G).
99+
//
100+
// polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
101+
// speed_reading_intervals: [A,C), [C,D), [D,G).
100102
repeated SpeedReadingInterval speed_reading_intervals = 3;
101103
}
102104

@@ -109,6 +111,34 @@ message RouteLegTravelAdvisory {
109111
// we expect that road contains tolls but we do not know an estimated price.
110112
// If this field does not exist, then there is no toll on the RouteLeg.
111113
TollInfo toll_info = 1;
114+
115+
// Speed reading intervals detailing traffic density. Applicable in case of
116+
// `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.
120+
//
121+
// Example:
122+
//
123+
// polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
124+
// speed_reading_intervals: [A,C), [C,D), [D,G).
125+
repeated SpeedReadingInterval speed_reading_intervals = 2;
126+
}
127+
128+
// Encapsulates the additional information that the user should be informed
129+
// about, such as possible traffic zone restriction etc. on a leg step.
130+
message RouteLegStepTravelAdvisory {
131+
// Speed reading intervals detailing traffic density. Applicable in case of
132+
// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
133+
// 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
135+
// point of the preceding interval.
136+
//
137+
// Example:
138+
//
139+
// polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
140+
// speed_reading_intervals: [A,C), [C,D), [D,G).
141+
repeated SpeedReadingInterval speed_reading_intervals = 1;
112142
}
113143

114144
// Encapsulates the traffic restriction applied to the route. As of October
@@ -200,6 +230,10 @@ message RouteLegStep {
200230

201231
// Navigation instructions.
202232
NavigationInstruction navigation_instruction = 6;
233+
234+
// Encapsulates the additional information that the user should be informed
235+
// about, such as possible traffic zone restriction etc. on a leg step.
236+
RouteLegStepTravelAdvisory travel_advisory = 7;
203237
}
204238

205239
message NavigationInstruction {

google/maps/routes/v1/route_matrix_element.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/route_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/toll_passes.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/vehicle_emission_type.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1/waypoint.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/maps/routes/v1alpha/route_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)