![]() |
![]()
| ![]() |
![]()
NAMEPaws::LocationService::CalculateRoute - Arguments for method CalculateRoute on Paws::LocationService DESCRIPTIONThis class represents the parameters used for calling the method CalculateRoute on the Amazon Location Service service. Use the attributes of this class as arguments to method CalculateRoute. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CalculateRoute. SYNOPSISmy $geo = Paws->service('LocationService'); my $CalculateRouteResponse = $geo->CalculateRoute( CalculatorName => 'MyResourceName', DeparturePosition => [ 1, ... ], DestinationPosition => [ 1, ... ], CarModeOptions => { AvoidFerries => 1, # OPTIONAL AvoidTolls => 1, # OPTIONAL }, # OPTIONAL DepartNow => 1, # OPTIONAL DepartureTime => '1970-01-01T01:00:00', # OPTIONAL DistanceUnit => 'Kilometers', # OPTIONAL IncludeLegGeometry => 1, # OPTIONAL TravelMode => 'Car', # OPTIONAL TruckModeOptions => { AvoidFerries => 1, # OPTIONAL AvoidTolls => 1, # OPTIONAL Dimensions => { Height => 1, # OPTIONAL Length => 1, # OPTIONAL Unit => 'Meters', # values: Meters, Feet; OPTIONAL Width => 1, # OPTIONAL }, # OPTIONAL Weight => { Total => 1, # OPTIONAL Unit => 'Kilograms', # values: Kilograms, Pounds; OPTIONAL }, # OPTIONAL }, # OPTIONAL WaypointPositions => [ [ 1, ... ], ... # min: 2, max: 2 ], # OPTIONAL ); # Results: my $Legs = $CalculateRouteResponse->Legs; my $Summary = $CalculateRouteResponse->Summary; # Returns a L<Paws::LocationService::CalculateRouteResponse> object. Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see <https://docs.aws.amazon.com/goto/WebAPI/geo/CalculateRoute> ATTRIBUTESREQUIRED CalculatorName => StrThe name of the route calculator resource that you want to use to calculate a route. CarModeOptions => Paws::LocationService::CalculateRouteCarModeOptionsSpecifies route preferences when traveling by "Car", such as avoiding routes that use ferries or tolls. Requirements: "TravelMode" must be specified as "Car". DepartNow => BoolSets the time of departure as the current time. Uses the current time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route. Default Value: "false" Valid Values: "false" | "true" REQUIRED DeparturePosition => ArrayRef[Num]The start position for the route. Defined in WGS 84 (https://earth-info.nga.mil/GandG/wgs84/index.html) format: "[longitude, latitude]".
If you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road). Valid Values: "[-180 to 180,-90 to 90]" DepartureTime => StrSpecifies the desired time of departure. Uses the given time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route. Setting a departure time in the past returns a "400 ValidationException" error.
REQUIRED DestinationPosition => ArrayRef[Num]The finish position for the route. Defined in WGS 84 (https://earth-info.nga.mil/GandG/wgs84/index.html) format: "[longitude, latitude]".
If you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road). Valid Values: "[-180 to 180,-90 to 90]" DistanceUnit => StrSet the unit system to specify the distance. Default Value: "Kilometers" Valid values are: "Kilometers", "Miles" IncludeLegGeometry => BoolSet to include the geometry details in the result for each path between a pair of positions. Default Value: "false" Valid Values: "false" | "true" TravelMode => StrSpecifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility. The "TravelMode" you specify determines how you specify route preferences:
Default Value: "Car" Valid values are: "Car", "Truck", "Walking" TruckModeOptions => Paws::LocationService::CalculateRouteTruckModeOptionsSpecifies route preferences when traveling by "Truck", such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road. Requirements: "TravelMode" must be specified as "Truck". WaypointPositions => ArrayRef[ArrayRef[Num]]Specifies an ordered list of up to 23 intermediate positions to include along a route between the departure position and destination position.
If you specify a waypoint position that's not located on a road, Amazon Location moves the position to the nearest road (https://docs.aws.amazon.com/location/latest/developerguide/calculate-route.html#snap-to-nearby-road). Specifying more than 23 waypoints returns a "400 ValidationException" error. Valid Values: "[-180 to 180,-90 to 90]" SEE ALSOThis class forms part of Paws, documenting arguments for method CalculateRoute in Paws::LocationService BUGS and CONTRIBUTIONSThe source code is located here: <https://github.com/pplu/aws-sdk-perl> Please report bugs to: <https://github.com/pplu/aws-sdk-perl/issues>
|