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

This package is auto-updated.

Last update: 2024-03-15 19:16:25 UTC


README

Latest Stable Version Total Downloads Software License

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!