Skip to content

About

🇧🇪 Geocoder bpost adapter - Coverage: Belgium

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🇧🇪 Geocoder PHP "bpost" provider

Geocoder PHP is a PHP library which helps you build geo-aware applications by providing a powerful abstraction layer for geocoding manipulations.

This is the "bpost" provider for the Geocoder PHP.

Latest Stable Version Total Downloads Monthly Downloads License

Note

If you want to submit an Issue or create a Pull Request, please do so in the main repository: https://github.com/jbelien/geocoder-php-providers.

Information

Install

composer require jbelien/geocoder-php-bpost-provider

Usage

See Geocoder PHP README file.

use Geocoder\Query\GeocodeQuery;

$httpClient = new \Http\Adapter\Guzzle6\Client();
$provider = new \Geocoder\Provider\bpost\bpost($httpClient);
$geocoder = new \Geocoder\StatefulGeocoder($provider, 'en');

// Query with unstructured address
$result = $geocoder->geocodeQuery(GeocodeQuery::create('5 Place des Palais 1000 Bruxelles'));

// Query with structured address
$query = GeocodeQuery::create('5 Place des Palais 1000 Bruxelles')
    ->withData('streetNumber', '5')
    ->withData('streetName', 'Place des Palais')
    ->withData('postalCode', '1000')
    ->withData('locality', 'Bruxelles');
$results = $geocoder->geocodeQuery($query);

About

🇧🇪 Geocoder bpost adapter - Coverage: Belgium

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages