Download the PHP package jbohme/nominatim-laravel without Composer
On this page you can find all versions of the php package jbohme/nominatim-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbohme/nominatim-laravel
More information about jbohme/nominatim-laravel
Files in jbohme/nominatim-laravel
Package nominatim-laravel
Short Description Wrapper for Nominatim API to Laravel
License MIT
Homepage https://github.com/jbohme/php-nominatim
Informations about the package nominatim-laravel
Nominatim Laravel
A simple interface to OSM Nominatim.
See Nominatim documentation for info on the service.
Installation
Install the package through composer:
You must publish a project configuration with:
After that the file config/nominatim.php will be ready.
If you are going to use a custom url, the NOMINATIM_URL parameter must be included in the .env
Basic usage
Create a new instance of Nominatim.
Searching by query :
Or break it down by address :
Or do a reverse query :
Or do a lookup query :
Or do a details query (by place_id):
Or do a details query (by osm type and osm id):
By default, the output format of the request is json and the wrapper return a array of results. It can be also xml, but the wrapper return a object SimpleXMLElement
How to override request header ?
There are two possibilities :
-
By
Nominatim
instance, for all request : - By
find
method, for a request : ``
How to customize HTTP client configuration ?
You can inject your own HTTP client with your specific configuration. For instance, you can edit user-agent and timeout for all your requests
Note
This projet was inpired by the maxhelias/php-nominatim. The code has been adapted to the Laravel standard for future implementations.
Recall Usage Policy Nominatim
If you use the service : http://nominatim.openstreetmap.org/, please see Nominatim usage policy.