Class: Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummary
- Inherits:
-
Object
- Object
- Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummary
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/places_v1/classes.rb,
lib/google/apis/places_v1/representations.rb,
lib/google/apis/places_v1/representations.rb
Overview
The duration and distance from the routing origin to a place in the response,
and a second leg from that place to the destination, if requested. Note:
Adding routingSummaries
in the field mask without also including either the
routingParameters.origin
parameter or the searchAlongRouteParameters.
polyline.encodedPolyline
parameter in the request causes an error.
Instance Attribute Summary collapse
-
#directions_uri ⇒ String
A link to show directions on Google Maps using the waypoints from the given routing summary.
-
#legs ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummaryLeg>
The legs of the trip.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummary
constructor
A new instance of GoogleMapsPlacesV1RoutingSummary.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleMapsPlacesV1RoutingSummary
Returns a new instance of GoogleMapsPlacesV1RoutingSummary.
2516 2517 2518 |
# File 'lib/google/apis/places_v1/classes.rb', line 2516 def initialize(**args) update!(**args) end |
Instance Attribute Details
#directions_uri ⇒ String
A link to show directions on Google Maps using the waypoints from the given
routing summary. The route generated by this link is not guaranteed to be the
same as the route used to generate the routing summary. The link uses
information provided in the request, from fields including routingParameters
and searchAlongRouteParameters
when applicable, to generate the directions
link.
Corresponds to the JSON property directionsUri
2505 2506 2507 |
# File 'lib/google/apis/places_v1/classes.rb', line 2505 def directions_uri @directions_uri end |
#legs ⇒ Array<Google::Apis::PlacesV1::GoogleMapsPlacesV1RoutingSummaryLeg>
The legs of the trip. When you calculate travel duration and distance from a
set origin, legs
contains a single leg containing the duration and distance
from the origin to the destination. When you do a search along route, legs
contains two legs: one from the origin to place, and one from the place to the
destination.
Corresponds to the JSON property legs
2514 2515 2516 |
# File 'lib/google/apis/places_v1/classes.rb', line 2514 def legs @legs end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2521 2522 2523 2524 |
# File 'lib/google/apis/places_v1/classes.rb', line 2521 def update!(**args) @directions_uri = args[:directions_uri] if args.key?(:directions_uri) @legs = args[:legs] if args.key?(:legs) end |