@googlemaps/routing 2.2.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -79,7 +79,6 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ
79
79
  | --------------------------- | --------------------------------- |
80
80
  | compute route matrix | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-routing/samples/generated/v2/routes.compute_route_matrix.js) |
81
81
  | compute routes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-routing/samples/generated/v2/routes.compute_routes.js) |
82
- | maps | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-routing/samples/generated/v2/snippet_metadata_google.maps.routing.v2.json) |
83
82
 
84
83
 
85
84
  ## Supported Node.js Versions
@@ -113,7 +112,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages]
113
112
 
114
113
  ## Contributing
115
114
 
116
- Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-routing/CONTRIBUTING.md).
115
+ Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
117
116
 
118
117
  Please note that this `README.md`
119
118
  and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
@@ -123,7 +122,7 @@ are generated from a central template.
123
122
 
124
123
  Apache Version 2.0
125
124
 
126
- See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-routing/LICENSE)
125
+ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
127
126
 
128
127
  [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
129
128
  [projects]: https://console.cloud.google.com/project
@@ -54,6 +54,33 @@ message PolylineDetails {
54
54
  DOES_NOT_EXIST = 2;
55
55
  }
56
56
 
57
+ // Encapsulates information about tunnels along the polyline.
58
+ message TunnelInfo {
59
+ // Denotes whether a tunnel exists for a given stretch of the polyline.
60
+ RoadFeatureState tunnel_presence = 1;
61
+
62
+ // The location of tunnel related information along the polyline.
63
+ PolylinePointIndex polyline_point_index = 2;
64
+ }
65
+
66
+ // Encapsulates information about bridges along the polyline.
67
+ message BridgeInfo {
68
+ // Denotes whether a bridge exists for a given stretch of the polyline.
69
+ RoadFeatureState bridge_presence = 1;
70
+
71
+ // The location of bridge related information along the polyline.
72
+ PolylinePointIndex polyline_point_index = 2;
73
+ }
74
+
75
+ // Encapsulates information about skyways along the polyline.
76
+ message SkywayInfo {
77
+ // Denotes whether a skyway exists for a given stretch of the polyline.
78
+ RoadFeatureState skyway_presence = 1;
79
+
80
+ // The location of skyway related information along the polyline.
81
+ PolylinePointIndex polyline_point_index = 2;
82
+ }
83
+
57
84
  // Encapsulates information about flyovers along the polyline.
58
85
  message FlyoverInfo {
59
86
  // Output only. Denotes whether a flyover exists for a given stretch of the
@@ -76,9 +103,21 @@ message PolylineDetails {
76
103
  PolylinePointIndex polyline_point_index = 2;
77
104
  }
78
105
 
106
+ // Tunnel details along the polyline. This field is populated if the request
107
+ // specifies the `avoid_tunnels` route modifier and the resultant route fails
108
+ // to avoid them, OR if `TUNNEL_INFO_ON_POLYLINE` is specified in
109
+ // `extra_computations` and the route contains tunnels.
110
+ repeated TunnelInfo tunnel_info = 8;
111
+
79
112
  // Flyover details along the polyline.
80
113
  repeated FlyoverInfo flyover_info = 12;
81
114
 
82
115
  // Narrow road details along the polyline.
83
116
  repeated NarrowRoadInfo narrow_road_info = 13;
117
+
118
+ // Bridge details along the polyline.
119
+ repeated BridgeInfo bridge_info = 14;
120
+
121
+ // Skyway details along the polyline.
122
+ repeated SkywayInfo skyway_info = 15;
84
123
  }
@@ -16,6 +16,7 @@ syntax = "proto3";
16
16
 
17
17
  package google.maps.routing.v2;
18
18
 
19
+ import "google/api/field_behavior.proto";
19
20
  import "google/maps/routing/v2/toll_passes.proto";
20
21
  import "google/maps/routing/v2/vehicle_info.proto";
21
22
 
@@ -61,4 +62,13 @@ message RouteModifiers {
61
62
  // Applies only to the `DRIVE` and `TWO_WHEELER`
62
63
  // [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
63
64
  repeated TollPass toll_passes = 6;
65
+
66
+ // Optional. When set to true, avoids tunnels where reasonable, giving
67
+ // preference to routes not containing tunnels. Applies only to the `DRIVE`
68
+ // and `TWO_WHEELER`
69
+ // [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
70
+ // [`RoutingPreference`][google.maps.routing.v2.RoutingPreference]
71
+ // must be set to `TRAFFIC_AWARE_OPTIMAL`.
72
+ // This field is not supported in ComputeRouteMatrix.
73
+ bool avoid_tunnels = 7 [(google.api.field_behavior) = OPTIONAL];
64
74
  }
@@ -162,6 +162,7 @@ message ComputeRoutesRequest {
162
162
  }
163
163
 
164
164
  // Extra computations to perform while completing the request.
165
+ // Additional values may be added in the future.
165
166
  enum ExtraComputation {
166
167
  // Not used. Requests containing this value will fail.
167
168
  EXTRA_COMPUTATION_UNSPECIFIED = 0;
@@ -175,7 +176,7 @@ message ComputeRoutesRequest {
175
176
  // Traffic aware polylines for the route(s).
176
177
  TRAFFIC_ON_POLYLINE = 3;
177
178
 
178
- // [`NavigationInstructions`](google.maps.routing.v2.NavigationInstructions.instructions)
179
+ // [`NavigationInstruction`][google.maps.routing.v2.NavigationInstruction]
179
180
  // presented as a formatted HTML text string. This content
180
181
  // is meant to be read as-is. This content is for display only.
181
182
  // Do not programmatically parse it.
@@ -183,17 +184,32 @@ message ComputeRoutesRequest {
183
184
 
184
185
  // Flyover information for the route(s). The
185
186
  // `routes.polyline_details.flyover_info` fieldmask must be specified to
186
- // return this information. This data will only currently be populated for
187
+ // return this information. This data will currently only be populated for
187
188
  // certain metros in India. This feature is experimental, and the
188
189
  // SKU/charge is subject to change.
189
190
  FLYOVER_INFO_ON_POLYLINE = 7;
190
191
 
191
192
  // Narrow road information for the route(s). The
192
193
  // `routes.polyline_details.narrow_road_info` fieldmask must be specified
193
- // to return this information. This data will only currently be populated
194
+ // to return this information. This data will currently only be populated
194
195
  // for certain metros in India. This feature is experimental, and the
195
196
  // SKU/charge is subject to change.
196
197
  NARROW_ROAD_INFO_ON_POLYLINE = 8;
198
+
199
+ // Tunnel information for the route(s). The
200
+ // `routes.polyline_details.tunnel_info` fieldmask must be specified to
201
+ // return this information.
202
+ TUNNEL_INFO_ON_POLYLINE = 9;
203
+
204
+ // Bridge information for the route(s). The
205
+ // `routes.polyline_details.bridge_info` fieldmask must be specified to
206
+ // return this information.
207
+ BRIDGE_INFO_ON_POLYLINE = 10;
208
+
209
+ // Skyway information for the route(s). The
210
+ // `routes.polyline_details.skyway_info` fieldmask must be specified to
211
+ // return this information.
212
+ SKYWAY_INFO_ON_POLYLINE = 11;
197
213
  }
198
214
 
199
215
  // Required. Origin waypoint.
@@ -277,9 +293,9 @@ message ComputeRoutesRequest {
277
293
  // Optional. If set to true, the service attempts to minimize the overall cost
278
294
  // of the route by re-ordering the specified intermediate waypoints. The
279
295
  // request fails if any of the intermediate waypoints is a `via` waypoint. Use
280
- // `ComputeRoutesResponse.Routes.optimized_intermediate_waypoint_index` to
296
+ // `ComputeRoutesResponse.routes.optimized_intermediate_waypoint_index` to
281
297
  // find the new ordering.
282
- // If `ComputeRoutesResponseroutes.optimized_intermediate_waypoint_index` is
298
+ // If `ComputeRoutesResponse.routes.optimized_intermediate_waypoint_index` is
283
299
  // not requested in the `X-Goog-FieldMask` header, the request fails.
284
300
  // If `optimize_waypoint_order` is set to false,
285
301
  // `ComputeRoutesResponse.optimized_intermediate_waypoint_index` will be
@@ -225,6 +225,9 @@ enum TollPass {
225
225
  // MI, USA.
226
226
  US_MI_BCPASS = 94;
227
227
 
228
+ // MI, USA.
229
+ US_MI_BREAKAWAY = 101;
230
+
228
231
  // MI, USA.
229
232
  US_MI_GROSSE_ILE_TOLL_BRIDGE_PASS_TAG = 37;
230
233
 
@@ -44,7 +44,7 @@ message Waypoint {
44
44
  string address = 7;
45
45
 
46
46
  // A token that identifies a
47
- // [`NavigationPoint`](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint),
47
+ // [`NavigationPoint`](/maps/documentation/geocoding/reference/rest/v4alpha/geocode.destinations/searchDestinations#navigationpoint),
48
48
  // obtained from the `SearchDestinations` method of the Geocoding API.
49
49
  string navigation_point_token = 8;
50
50
  }