Download the PHP package maxh/php-nominatim without Composer
On this page you can find all versions of the php package maxh/php-nominatim. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
All versions of php-nominatim with dependencies
Informations about the package php-nominatim
Wrapper Nominatim API
A simple interface to OSM Nominatim.
See Nominatim documentation for info on the service.
Install the package through composer:
Make sure, that you include the composer autoloader somewhere in your codebase.
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 :
Nominatiminstance, for all request :
findmethod, 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
This projet was inpired by the Opendi/nominatim project with more features like reverse query, support of the xml format, customize HTTP client and more on which i work.