Skip to content

Commit 41bb0cf

Browse files
authored
[Nominatim] Update Readme.md
Related to #1061
1 parent 82d0ff6 commit 41bb0cf

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/Provider/Nominatim/Readme.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,27 @@ This is the Nominatim provider from the PHP Geocoder. This is a **READ ONLY** re
1212

1313
All usage of the Nominatim provider using `nominatim.openstreetmap.org` must follow the [Nominatim Usage Policy](https://operations.osmfoundation.org/policies/nominatim/) !
1414

15-
### Install
15+
## Install
1616

1717
```bash
1818
composer require geocoder-php/nominatim-provider
1919
```
2020

21-
### Contribute
21+
## Usage
22+
23+
If you want to use the "default" Nominatim instance (https://nominatim.openstreetmap.org/) :
24+
25+
```php
26+
$provider = \Geocoder\Provider\Nominatim::withOpenStreetMapServer($httpClient, $userAgent);
27+
```
28+
29+
If you want to specify yourself the server that will be used :
30+
31+
```php
32+
$provider = new \Geocoder\Provider\Nominatim($httpClient, 'https://nominatim.openstreetmap.org', $userAgent);
33+
```
34+
35+
## Contribute
2236

2337
Contributions are very welcome! Send a pull request to the [main repository](https://github.com/geocoder-php/Geocoder) or
2438
report any issues you find on the [issue tracker](https://github.com/geocoder-php/Geocoder/issues).

0 commit comments

Comments
 (0)