nodinatim -
Geocode locations with Nominatim and Node.js
Docs
Initialize
// Can include own Nominatim installation URL string in constructor; falls back to public APIconst geocoder = ;
geocode(query)
Params:
street: String city: String county: String state: String postalcode: String || Number viewbox: left: Number top: Number right: Number bottom: Number bounded: Boolean excludePlaces: String
Returns a Promise with Lat/Long pair like below:
latitude: Number longitude: Number
Example
; const geocoder = ; // Can include self-hosted nominatim server in instantiation. Defaults to https://nominatim.openstreetmap.org/ geocoder ; // OR geocoder ;