1.1.6 • Published 7 years ago

geocodr v1.1.6

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

node-geocodr

this simple component allows for geocoding from various providers

Build Status XO code style

currently supported adapters

adapters

example usage

currently just returns an array of the form lon, lat or null if the address can't be geocoded

geocode single

import geocode, {nominatim} from 'geocodr'

geocode('10021', nominatim).then((coordinates)=>{
  // do stuff with coordinates
})

geocode multiple

import geocode, {geocodio} from 'geocodr'

geocode(['10021', '06067', '06108'], geocodio).then((coordinates)=>{
  // do stuff with coordinates (will be an array of [lon, lat] arrays in respective order)
})

override default

import geocode, {mapzen} from 'geocodr'

geocode('10021', {...mapzen, api_key: 'my-api-key'}).then((coordinates)=>{
  // do stuff with coordinates
})
1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago