From 6bf1da851c55c00d10cadbe2ad32d20c092d28ee Mon Sep 17 00:00:00 2001 From: Rick Hays Date: Fri, 27 Sep 2019 16:48:42 -0500 Subject: [PATCH] Changed drive distance addresses. More notable White House to Munster House Also changed function name to match my standard. Signed-off-by: Rick Hays --- class/geocode.php | 2 +- geocode-example.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/class/geocode.php b/class/geocode.php index 9235966..e2de15f 100644 --- a/class/geocode.php +++ b/class/geocode.php @@ -71,7 +71,7 @@ class geocode * @example - https://maps.googleapis.com/maps/api/distancematrix/json?'.$this->api_key.'&origins='.rawurlencode($origin).'&destinations='.rawurlencode($destination).'&mode=driving&units=imperial&sensor=false * */ - public function Get_Distance($origin, $destination, $mode='driving', $unit='imperial') + public function getDistance($origin, $destination, $mode='driving', $unit='imperial') { // Set defaults to test for $modes = array('driving', 'walking', 'bicycling'); diff --git a/geocode-example.php b/geocode-example.php index 214d7c6..1325077 100644 --- a/geocode-example.php +++ b/geocode-example.php @@ -17,8 +17,8 @@ // -- Drive Distance --------------------------------------------------------------------------------------------------- $origin = '1600 Pennsylvania Ave NW, Washington, DC 20500'; - $destination = '4433 N Indiana Ave, Kansas City, MO 64117'; - $dist = $geocode->Get_Distance($origin, $destination, 'driving', 'imperial'); + $destination = '1313 Mockingbird Lane, North Hollywood, CA 91602'; + $dist = $geocode->getDistance($origin, $destination, 'driving', 'imperial'); echo 'STATUS: ' . $dist['status'] . '
'; echo 'DISTANCE: ' . $dist['distance'] . '
'; echo 'DURATION: ' . $dist['duration'] . '
';