| 
<?phpinclude('googleApiClass.php');
 $google = new googleApiClass();
 
 $google->setFromAddress('England');
 $google->setToAddress('France');
 $google->setLanguage('us');
 $google->setImageOutput('png');
 $google->setZoom(14);
 $google->setScale('1');
 try{
 $pathImg = '/tmp/mapMe.png';
 $google->findAddress()->withImage(5,$pathImg);
 
 echo "From: ". $google->getFromAddress().'<br>';
 echo "To: ". $google->getToAddress().'<br>';
 echo "Distance: ".($google->getDistance()).' meters<br>';
 echo "Time: ".($google->getTime()).' seconds<br>';
 echo " {$google->getCountSteps()} steps between from and to address<br>";
 echo "<hr><strong>Steps</strong>";
 echo "<pre>";
 print_r($google->getInstructions());
 echo "</pre>";
 if(!$google->getImgBuffer()){
 echo "No image was requested";
 }else{
 echo "Followed Image <br>";
 echo "Scale: ".$google->getScale().'<br>';
 echo "Center: ".$google->getCenterStep().'<br>';
 echo "Zoom: ".$google->getZoom().'<br>';
 
 echo "<img src='showimage.php?path={$pathImg}'><br>";
 
 }
 
 
 }catch(Exception $e ){
 echo $e->getMessage();
 }
 
 ?>
 |