diff --git a/geocode-example.php b/geocode-example.php
index 1325077..f05eb5c 100644
--- a/geocode-example.php
+++ b/geocode-example.php
@@ -5,19 +5,24 @@
$geocode = new geocode();
// -- Straight Line Distance -------------------------------------------------------------------------------------------
+ echo 'Straight Line Distance between two Lat/Lon
';
echo $geocode->straight_line_distance(39.10968, -94.57949, 39.17521, -94.53957) ;
- echo '
' . str_repeat('=',60) . '
';
+ echo '
' . str_repeat('=',60) . '
';
// -- Get the Lat/Lon of a address -------------------------------------------------------------------------------------
- $latlong = $geocode->getLatLong('1600 Pennsylvania Ave NW, Washington, DC 20500');
+ $address = '1600 Pennsylvania Ave NW, Washington, DC 20500
';
+ echo 'Lat/Lon of address: ' . $address;
+ $latlong = $geocode->getLatLong($address);
echo 'STATUS: ' . $latlong['status'] . '
';
echo 'LAT: ' . $latlong['lat'] . '
';
echo 'LON: ' . $latlong['lon'] . '
';
echo '
' . str_repeat('=',60) . '
';
// -- Drive Distance ---------------------------------------------------------------------------------------------------
- $origin = '1600 Pennsylvania Ave NW, Washington, DC 20500';
- $destination = '1313 Mockingbird Lane, North Hollywood, CA 91602';
+ $origin = '1600 Pennsylvania Ave NW, Washington, DC 20500
';
+ $destination = '1313 Mockingbird Lane, North Hollywood, CA 91602
';
+ echo 'Drive Distance:
';
+ echo 'From: ' . $origin . ' to: ' . $destination . '
';
$dist = $geocode->getDistance($origin, $destination, 'driving', 'imperial');
echo 'STATUS: ' . $dist['status'] . '
';
echo 'DISTANCE: ' . $dist['distance'] . '
';