geocoder-php/yandex-provider
Yandex provider for the Geocoder PHP library. Adds Yandex Geocoder and reverse geocoding support, returning normalized address and coordinate data via the standard Geocoder interfaces. Suitable for Laravel or standalone PHP projects.
This is the Yandex provider from the PHP Geocoder. This is a READ ONLY repository. See the main repo for information and documentation.
composer require geocoder-php/yandex-provider
The API now requires an API key. See here for more information.
$httpClient = new \Http\Discovery\Psr18Client();
$provider = new \Geocoder\Provider\Yandex\Yandex($httpClient, null, '<your-api-key>);
$result = $geocoder->geocodeQuery(GeocodeQuery::create('ул.Ленина, 19, Минск 220030, Республика Беларусь'));
$result = $geocoder->reverseQuery(ReverseQuery::fromCoordinates(...));
The default language-locale is ru-RU, you can choose between uk-UA, be-BY,
en-US, en-BR and tr-TR.
It's possible to precise the toponym to get more accurate result for reverse geocoding:
house, street, metro, district and locality.
Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.
How can I help you explore Laravel packages today?