Google Maps Directions

Instantiate Directions
$direction = eden('google')->maps($_SESSION['token'])->direction();
Direction Methods
Method Arguments Returns Description
$direction->avoidHighways(); none Eden_Google_Maps_Direction Set Distance to avoid highways
$direction->avoidTolls(); none Eden_Google_Maps_Direction Set Distance to avoid tolls
$direction->bicycling(); none Eden_Google_Maps_Direction Specifies the mode of transport to use when calculating directions is bicycling.
$direction->driving(); none Eden_Google_Maps_Direction Specifies the mode of transport to use when calculating directions is driving.
$direction->transit(); none Eden_Google_Maps_Direction Requests directions via public transit routes. Both arrivalTime and departureTime are only valid when mode is set to "transit".
$direction->walking(); none Eden_Google_Maps_Direction Specifies the mode of transport to use when calculating directions is walking.
$direction->setLanguage($language);
  1. string|integer
Eden_Google_Maps_Direction The language in which to return results.
$direction->setWaypoints($waypoint);
  1. string|integer
Eden_Google_Maps_Direction Waypoints alter a route by routing it through the specified location(s)
$direction->setRegion($region);
  1. string|integer
Eden_Google_Maps_Direction The region code
$direction->setUnitToImperial(); none Eden_Google_Maps_Direction Returns distances in miles and feet.
$direction->setAlternatives(); none Eden_Google_Maps_Direction Specifies that the Directions service may provide more than one route alternative in the response.
$direction->setDepartureTime($departureTime);
  1. string|int
Eden_Google_Maps_Direction Specifies the desired time of departure for transit directions as seconds -timespamp
$direction->setArrivalTime($arrivalTime);
  1. string|int
Eden_Google_Maps_Direction specifies the desired time of arrival for transit directions as seconds -timespamp
$direction->getDirection($origin, $destination, $sensor = 'false');
  1. string|integer|float
  2. - The address or textual latitude/longitude value from which you wish to calculate directions
  3. string|integer|float
  4. - The address or textual latitude/longitude value from which you wish to calculate directions
  5. booelean
  6. - Indicates whether or not the directions request comes from a device with a location sensor
array Returns calculated directions between locations

© 2012 Openovate Labs. All rights reserved.