This geocoder works for US addressed only.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install smarty_streets_geocoder
# This is your SmartyStreets application key for the SmartyStreets Geocoder. # See https://smartystreets.com/docs/authentication#keypairs Geokit::Geocoders::SmartyStreetsGeocoder.auth_id = 'REPLACE_WITH_YOUR_KEY' Geokit::Geocoders::SmartyStreetsGeocoder.auth_token = 'REPLACE_WITH_YOUR_CODE'
Because US Zipcode API requires zip and/or city and state it's better to pass an instance of GeoLoc rather than address string.
# use :smarty_streets to specify this geocoder in your list of geocoders. Geokit::Geocoders::SmartyStreetsGeocoder.geocode( Geokit::GeoLoc.new(city: "Sunnyvale", state: "CA", country_code: "US") )
- Fork it ( https://github.com/[my-github-username]/smarty_streets_geocoder/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request