@owsas/nominatim-js
Version:
Unofficial JS SDK for the Nominatim Open Street Map service that allows geocoding and reverse geocoding
58 lines (39 loc) • 1.05 kB
Markdown
Unofficial JS SDK for the Nominatim Open Street Map service that allows geocoding and reverse geocoding
First, install the SDK
```
$> npm install --save @owsas/nominatim-js
```
Then, use it :). It works with Promises, or can be used with async / await.
```js
const { NominatimJS } = require('@owsas/nominatim-js');
NominatimJS.search({
q: 'bakery in new york'
}).then(results => {
// do something with results
}).catch(error => {
// error ocurred
})
```
```js
const { NominatimJS } = require('nominatim-js');
async function search(){
let results = await NominatimJS.search({
q: 'bakery in new york'
});
}
```
NOTE: To await the response, the call to the API must be written inside an async function
See examples folder in the repository
Juan Camilo Guarín Peñaranda
Otherwise SAS
Colombia
MIT
[](https://patreon.com/owsas)