Skip to content

Commit 24d7341

Browse files
feat: [routing] add API for experimental flyover and narrow road polyline details (#5865)
* feat: add API for experimental flyover and narrow road polyline details PiperOrigin-RevId: 703138506 Source-Link: googleapis/googleapis@a3211f3 Source-Link: googleapis/googleapis-gen@7616de9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNzYxNmRlOWM5YjhlNWU0YWJjZGYyNWY5MDY5ZWJlM2UzMjdmNTFlYiJ9 * 🦉 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: d-goog <[email protected]>
1 parent ad679d1 commit 24d7341

7 files changed

Lines changed: 2532 additions & 806 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// Copyright 2024 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/api/field_behavior.proto";
20+
21+
option csharp_namespace = "Google.Maps.Routing.V2";
22+
option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "PolylineDetailsProto";
25+
option java_package = "com.google.maps.routing.v2";
26+
option objc_class_prefix = "GMRV2";
27+
option php_namespace = "Google\\Maps\\Routing\\V2";
28+
option ruby_package = "Google::Maps::Routing::V2";
29+
30+
// Details corresponding to a given index or contiguous segment of a polyline.
31+
// Given a polyline with points P_0, P_1, ... , P_N (zero-based index), the
32+
// `PolylineDetails` defines an interval and associated metadata.
33+
message PolylineDetails {
34+
// Encapsulates the start and end indexes for a polyline detail.
35+
// For instances where the data corresponds to a single point, `start_index`
36+
// and `end_index` will be equal.
37+
message PolylinePointIndex {
38+
// The start index of this detail in the polyline.
39+
optional int32 start_index = 1;
40+
41+
// The end index of this detail in the polyline.
42+
optional int32 end_index = 2;
43+
}
44+
45+
// Encapsulates the states of road features along a stretch of polyline.
46+
enum RoadFeatureState {
47+
// The road feature's state was not computed (default value).
48+
ROAD_FEATURE_STATE_UNSPECIFIED = 0;
49+
50+
// The road feature exists.
51+
EXISTS = 1;
52+
53+
// The road feature does not exist.
54+
DOES_NOT_EXIST = 2;
55+
}
56+
57+
// Encapsulates information about flyovers along the polyline.
58+
message FlyoverInfo {
59+
// Output only. Denotes whether a flyover exists for a given stretch of the
60+
// polyline.
61+
RoadFeatureState flyover_presence = 1
62+
[(google.api.field_behavior) = OUTPUT_ONLY];
63+
64+
// The location of flyover related information along the polyline.
65+
PolylinePointIndex polyline_point_index = 2;
66+
}
67+
68+
// Encapsulates information about narrow roads along the polyline.
69+
message NarrowRoadInfo {
70+
// Output only. Denotes whether a narrow road exists for a given stretch of
71+
// the polyline.
72+
RoadFeatureState narrow_road_presence = 1
73+
[(google.api.field_behavior) = OUTPUT_ONLY];
74+
75+
// The location of narrow road related information along the polyline.
76+
PolylinePointIndex polyline_point_index = 2;
77+
}
78+
79+
// Flyover details along the polyline.
80+
repeated FlyoverInfo flyover_info = 12;
81+
82+
// Narrow road details along the polyline.
83+
repeated NarrowRoadInfo narrow_road_info = 13;
84+
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import "google/maps/routing/v2/localized_time.proto";
2121
import "google/maps/routing/v2/location.proto";
2222
import "google/maps/routing/v2/navigation_instruction.proto";
2323
import "google/maps/routing/v2/polyline.proto";
24+
import "google/maps/routing/v2/polyline_details.proto";
2425
import "google/maps/routing/v2/route_label.proto";
2526
import "google/maps/routing/v2/route_travel_mode.proto";
2627
import "google/maps/routing/v2/speed_reading_interval.proto";
@@ -131,6 +132,9 @@ message Route {
131132
// `TRAFFIC_AWARE_OPTIMAL`. `Route.route_token` is not supported for requests
132133
// that have Via waypoints.
133134
string route_token = 12;
135+
136+
// Contains information about details along the polyline.
137+
PolylineDetails polyline_details = 14;
134138
}
135139

136140
// Contains the additional information that the user should be informed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,20 @@ message ComputeRoutesRequest {
180180
// is meant to be read as-is. This content is for display only.
181181
// Do not programmatically parse it.
182182
HTML_FORMATTED_NAVIGATION_INSTRUCTIONS = 4;
183+
184+
// Flyover information for the route(s). The
185+
// `routes.polyline_details.flyover_info` fieldmask must be specified to
186+
// return this information. This data will only currently be populated for
187+
// certain metros in India. This feature is experimental, and the
188+
// SKU/charge is subject to change.
189+
FLYOVER_INFO_ON_POLYLINE = 7;
190+
191+
// Narrow road information for the route(s). The
192+
// `routes.polyline_details.narrow_road_info` fieldmask must be specified
193+
// to return this information. This data will only currently be populated
194+
// for certain metros in India. This feature is experimental, and the
195+
// SKU/charge is subject to change.
196+
NARROW_ROAD_INFO_ON_POLYLINE = 8;
183197
}
184198

185199
// Required. Origin waypoint.

0 commit comments

Comments
 (0)