demollc / sputnik-provider
This package is abandoned and no longer maintained.
No replacement package was suggested.
Geocoder Sputnik adapter
v1.0.1
2021-05-10 14:28 UTC
Requires
- php: ^7.3 || ^8.0
- geocoder-php/common-http: ^4.0
- willdurand/geocoder: ^4.0
Requires (Dev)
- geocoder-php/provider-integration-tests: ^1.0
- php-http/curl-client: ^2.2
- php-http/message: ^1.0
- phpunit/phpunit: ^9.5
Provides
README
This is the Sputnik provider from DemoLLC.
Install
composer require demollc/sputnik-provider
Usage
The API may require an API key. See here for more information.
use Geocoder\Query\GeocodeQuery; use Geocoder\Query\ReverseQuery; $httpClient = new \Http\Adapter\Guzzle7\Client(); $geocoder = new \Geocoder\Provider\Sputnik\Sputnik($httpClient, null, '<your-api-key>'); $result = $geocoder->geocodeQuery(GeocodeQuery::create('ул. Генерала Лизюкова, 4, Воронеж')); $result = $geocoder->reverseQuery(ReverseQuery::fromCoordinates(...));
Note
Reverse Query endpoint is frequently down and methods are created by manual.
Contribute
Contributions are very welcome!