PHP code example of danhunsaker / geocoder-mock-provider

1. Go to this page and download the library: Download danhunsaker/geocoder-mock-provider 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/ */

    

danhunsaker / geocoder-mock-provider example snippets


$provider = new \Danhunsaker\Geocoder\Provider\Mock\Mock(
    $httpClient,
    [38.8976633, -77.0365739],
    [
        'streetNumber' => '1600',
        'streetName' => 'Pennsylvania Avenue Northwest',
        'postalCode' => '20500',
        'locality' => 'Washington',
        'adminLevels' => [
            1 => [
                'level' => 1,
                'code' => 'DC',
                'name' => 'District of Columbia',
            ],
        ],
        'country' => 'United States',
        'countryCode' => 'US',
    ]
);