geo-coders
v0.2.0
Published
A set of geo coders
Downloads
2
Readme
Geo Coders
Install
$ npm install geo-coders
Usage
import { getAddressQuery, getFullAddressQuery, providers } from 'geo-coders';
providers.nominatim.getAddresses(getFullAddressQuery('21', 'Москва, улица Маросейка', false), 1, { lang: 'ru', country: 'by' })
.then(res => console.log(providers.nominatim.convert(res)));
providers.dadata.getAddresses(getAddressQuery('аэорпорт Шереметьево', 'Москва', false), 10, 'DADATA_AUTH_TOKEN')
.then(res => console.log(providers.dadata.convert(res)));
Converted Data Format
{
address,
lat,
lon,
postcode,
truncatedAddress /* up to 80 characters */
}
Supported GeoCoders
- daData (
dadata
) - Nominatim (
nominatim
)