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
Unofficial JS SDK for the Nominatim Open Street Map service that allows geocoding and reverse geocoding
<script type="module">
import owsasNominatimJs from 'https://cdn.skypack.dev/@owsas/nominatim-js';
</script>
Unofficial JS SDK for the Nominatim Open Street Map service that allows geocoding and reverse geocoding
First, install the SDK
gt; npm install --save @owsas/nominatim-js
Then, use it :). It works with Promises, or can be used with async / await.
const { NominatimJS } = require('@owsas/nominatim-js');
NominatimJS.search({
q: 'bakery in new york'
}).then(results => {
// do something with results
}).catch(error => {
// error ocurred
})
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