php-extended / php-api-org-openstreetmap-nominatim-object
An implementation of the php-extended/php-api-org-openstreetmap-nominatim-interface library
5.0.0
2022-12-18 16:57 UTC
Requires
Requires (Dev)
README
An implementation of the php-extended/php-api-org-openstreetmap-nominatim-interface library.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
- Download
composer.phar
from their website. - Then run the following command to install this library as dependency :
php composer.phar php-extended/php-api-org-openstreetmap-nominatim-object": "^5"
Basic Usage
This library may be used the following way :
use PhpExtended\Osm\OsmNominatimApiRequest;
use PhpExtended\Osm\OsmNominatimApiEndpoint;
$api = new OsmNominatimApiEndpoint($client);
$request = new OsmNominatimApiRequest();
$request->setQuery('New York');
$response = $api->searchGeocode($request);
/* @var $response \PhpExtended\Osm\OsmNominatimApiGeocodingResult */
echo $response->getLatitude().' '.$response->getLongitude();
License
MIT (See license file).