This is the OpenAPI provider from the PHP Geocoder. This is a READ ONLY repository. See the main repo for information and documentation.
composer require seoplague/openapi-provider
The API now requires an API key. See here for more information.
$httpClient = new \GuzzleHttp\Client();
$provider = new \Geocoder\Provider\OpenApi\OpenApi($httpClient, null, '<your-api-key>);
$result = $geocoder->geocodeQuery(GeocodeQuery::create('ул.Ленина, 19, Минск 220030, Республика Беларусь'));
$result = $geocoder->reverseQuery(ReverseQuery::fromCoordinates(...));
The default language-locale is en-US
Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.