
 Marcus Brasizza - 2013-05-02 20:38:23 - 
In reply to message 1 from Felip Estrugo 
you can do like this
with a folder maps in your public_html (www) with chmod 777 ...
i just put the php file to read the image because i didn't put the image in my public_html folder
 <?php
include('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 = 'maps/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='{$pathImg}'><br>";
                
    }
    
    
}catch(Exception $e ){
 echo $e->getMessage();
}
?>