JSPM

@deepzua/nominatim-js

1.0.16
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 27
  • Score
    100M100P100Q64778F
  • License MIT

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

Package Exports

  • @deepzua/nominatim-js
  • @deepzua/nominatim-js/lib/nominatim-js.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@deepzua/nominatim-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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