Skip to content

Commit e325ac5

Browse files
feat: [routing] added support for specifying waypoints as addresses (#4065)
* feat: added support for specifying waypoints as addresses docs: clarified usage of RouteLegStepTravelAdvisory in comment PiperOrigin-RevId: 515362180 Source-Link: googleapis/googleapis@bb333b2 Source-Link: googleapis/googleapis-gen@969447f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiOTY5NDQ3ZjA0YzQzMjYwZWFiMDU2MTA2MDU2YmFmM2MwNDE5ODhmMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: sofisl <[email protected]>
1 parent 406ca5c commit e325ac5

8 files changed

Lines changed: 2849 additions & 1795 deletions

File tree

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Copyright 2023 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.maps.routing.v2;
18+
19+
import "google/rpc/status.proto";
20+
21+
option cc_enable_arenas = true;
22+
option csharp_namespace = "Google.Maps.Routing.V2";
23+
option go_package = "google.golang.org/genproto/googleapis/maps/routing/v2;routing";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "GeocodingResultsProto";
26+
option java_package = "com.google.maps.routing.v2";
27+
option objc_class_prefix = "GMRV2";
28+
option php_namespace = "Google\\Maps\\Routing\\V2";
29+
option ruby_package = "Google::Maps::Routing::V2";
30+
31+
// Contains GeocodedWaypoints for origin, destination and intermediate
32+
// waypoints. Only populated for address waypoints.
33+
message GeocodingResults {
34+
// Origin geocoded waypoint.
35+
GeocodedWaypoint origin = 1;
36+
37+
// Destination geocoded waypoint.
38+
GeocodedWaypoint destination = 2;
39+
40+
// A list of intermediate geocoded waypoints each containing an index field
41+
// that corresponds to the zero-based position of the waypoint in the order
42+
// they were specified in the request.
43+
repeated GeocodedWaypoint intermediates = 3;
44+
}
45+
46+
// Details about the locations used as waypoints. Only populated for address
47+
// waypoints. Includes details about the geocoding results for the purposes of
48+
// determining what the address was geocoded to.
49+
message GeocodedWaypoint {
50+
// Indicates the status code resulting from the geocoding operation.
51+
google.rpc.Status geocoder_status = 1;
52+
53+
// The index of the corresponding intermediate waypoint in the request.
54+
// Only populated if the corresponding waypoint is an intermediate
55+
// waypoint.
56+
optional int32 intermediate_waypoint_request_index = 2;
57+
58+
// The type(s) of the result, in the form of zero or more type tags.
59+
// Supported types:
60+
// https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
61+
repeated string type = 3;
62+
63+
// Indicates that the geocoder did not return an exact match for the original
64+
// request, though it was able to match part of the requested address. You may
65+
// wish to examine the original request for misspellings and/or an incomplete
66+
// address.
67+
bool partial_match = 4;
68+
69+
// The place ID for this result.
70+
string place_id = 5;
71+
}

packages/google-maps-routing/protos/google/maps/routing/v2/route.proto

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,7 @@ message RouteLegTravelAdvisory {
145145
// Encapsulates the additional information that the user should be informed
146146
// about, such as possible traffic zone restriction on a leg step.
147147
message RouteLegStepTravelAdvisory {
148-
// Speed reading intervals detailing traffic density. Applicable in case of
149-
// `TRAFFIC_AWARE` and `TRAFFIC_AWARE_OPTIMAL` routing preferences.
150-
// The intervals cover the entire polyline of the RouteLegStep without
151-
// overlap. The start point of a specified interval is the same as the end
152-
// point of the preceding interval.
153-
//
154-
// Example:
155-
//
156-
// polyline: A ---- B ---- C ---- D ---- E ---- F ---- G
157-
// speed_reading_intervals: [A,C), [C,D), [D,G).
148+
// NOTE: This field is not currently populated.
158149
repeated SpeedReadingInterval speed_reading_intervals = 1;
159150
}
160151

packages/google-maps-routing/protos/google/maps/routing/v2/routes_service.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/maps/routing/v2/fallback_info.proto";
23+
import "google/maps/routing/v2/geocoding_results.proto";
2324
import "google/maps/routing/v2/polyline.proto";
2425
import "google/maps/routing/v2/route.proto";
2526
import "google/maps/routing/v2/route_modifiers.proto";
@@ -246,6 +247,9 @@ message ComputeRoutesResponse {
246247
// computation. When fallback mode is used, this field contains detailed info
247248
// about the fallback response. Otherwise this field is unset.
248249
FallbackInfo fallback_info = 2;
250+
251+
// Contains geocoding response info for waypoints specified as addresses.
252+
GeocodingResults geocoding_results = 3;
249253
}
250254

251255
// ComputeRouteMatrix request message

packages/google-maps-routing/protos/google/maps/routing/v2/waypoint.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ message Waypoint {
3939

4040
// The POI Place ID associated with the waypoint.
4141
string place_id = 2;
42+
43+
// Human readable address or a plus code.
44+
// See https://plus.codes for details.
45+
string address = 7;
4246
}
4347

4448
// Marks this waypoint as a milestone rather a stopping point. For

0 commit comments

Comments
 (0)