1.0.10 • Published 3 years ago

nominatim-js v1.0.10

Weekly downloads
35
License
MIT
Repository
github
Last release
3 years ago

Nominatim-JS

Unofficial JS SDK for the Nominatim Open Street Map service that allows geocoding and reverse geocoding

How to use?

First, install the SDK

$> npm install --save @owsas/nominatim-js

Then, use it :). It works with Promises, or can be used with async / await.

Example with promises

const { NominatimJS } = require('@owsas/nominatim-js');

NominatimJS.search({
  q: 'bakery in new york'
}).then(results => {
  // do something with results
}).catch(error => {
  // error ocurred
})

Example with async / await

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

More examples

See examples folder in the repository

Author

Juan Camilo Guarín Peñaranda
Otherwise SAS
Colombia

License

MIT

Support us on Patreon

patreon

1.0.10

3 years ago

1.0.9

4 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.5

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

7 years ago