PHP code example of gabrielbull / google-maps-geocoder

1. Go to this page and download the library: Download gabrielbull/google-maps-geocoder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

gabrielbull / google-maps-geocoder example snippets


$address = "2707 Congress St., San Diego, CA 92110";

use GoogleMaps\Geocoder\Geocoder;

$Geocoder = new Geocoder($address);

use GoogleMaps\Geocoder\Geocoder;

$Geocoder = new Geocoder();
$Geocoder->setAddress($address);

$response = $Geocoder->geocode();