NAME

Paws::LocationService::Leg

USAGE

This class represents one of two things:

Arguments in a call to a service

Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object.

As an example, if Att1 is expected to be a Paws::LocationService::Leg object:

$service_obj->Method(Att1 => { Distance => $value, ..., Steps => $value  });

Results returned from an API call

Use accessors for each attribute. If Att1 is expected to be an Paws::LocationService::Leg object:

$result = $service_obj->Method(...);
$result->Att1->Distance

DESCRIPTION

Contains the calculated route's details for each path between a pair of positions. The number of legs returned corresponds to one less than the total number of positions in the request.

For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road):

  • The StartPosition is the departure position.

  • The EndPosition is the destination position.

A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road.:

  • Leg 1: The StartPosition is the departure position . The EndPosition is the waypoint positon.

  • Leg 2: The StartPosition is the waypoint position. The EndPosition is the destination position.

ATTRIBUTES

REQUIRED Distance => Num

The distance between the leg's StartPosition and EndPosition along a calculated route.

  • The default measurement is Kilometers unless the request specifies a DistanceUnit of Miles.

REQUIRED DurationSeconds => Num

The estimated travel time between the leg's StartPosition and EndPosition. The travel mode and departure time that you specify in the request determines the calculated time.

REQUIRED EndPosition => ArrayRef[Num]

The terminating position of the leg. Follows the format [longitude,latitude].

If the EndPosition isn't located on a road, it's snapped to a nearby road (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road).

Geometry => Paws::LocationService::LegGeometry

Contains the calculated route's path as a linestring geometry.

REQUIRED StartPosition => ArrayRef[Num]

The starting position of the leg. Follows the format [longitude,latitude].

If the StartPosition isn't located on a road, it's snapped to a nearby road (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road).

REQUIRED Steps => ArrayRef[Paws::LocationService::Step]

Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.

SEE ALSO

This class forms part of Paws, describing an object used in Paws::LocationService

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues