Google Maps Distance

Instantiate Distance
$distance = eden('google')->maps($_SESSION['token'])->distance();
Distance Methods
Method Arguments Returns Description
$distance->avoidHighways(); none Eden_Google_Maps_Distance Set Distance to avoid highways
$distance->avoidTolls(); none Eden_Google_Maps_Distance Set Distance to avoid tolls
$distance->bicycling(); none Eden_Google_Maps_Distance Specifies the mode of transport to use when calculating directions is bicycling.
$distance->driving(); none Eden_Google_Maps_Distance Specifies the mode of transport to use when calculating directions is driving.
$distance->walking(); none Eden_Google_Maps_Distance Specifies the mode of transport to use when calculating directions is walking.
$distance->setLanguage($language);
  1. string|integer
Eden_Google_Maps_Distance The language in which to return results.
$distance->setUnitToImperial(); none Eden_Google_Maps_Distance Returns distances in miles and feet.
$distance->getResponse($origin, $destination, $sensor = 'false');
  1. string|integer|float
  2. string|integer|float
  3. string
array Returns travel distance and time for a matrix of origins and destinations

© 2012 Openovate Labs. All rights reserved.