GeoInfo gem offers comprehensive and reliable databases of localities and zip codes for numerous state of india. Such data may be integrated to professional software, websites, may be used to generate statistics and to various other ends. Gem will provide localities, administrative subdivisions, state and geographical coordinates.
Demo application at https://github.com/diatmpravin/geoinf-demo
(follow readme for installation steps)
A zipcode to a place
A zipcode to a country
A zipcode to a state
A zipcode to a state code
A zipcode to a district
A zipcode to a Latitude
A zipcode to a Longitude
Add this line to your application's Gemfile:
gem 'geoinfo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install geoinfo
<%= zip_code.to_region %>
<%= zip_code.to_region(:state => true) %>
<%= zip_code.to_region(:district => true) %>
<%= zip_code.to_region(:country => true) %>
<%= zip_code.to_region(:lat => true) %>
<%= zip_code.to_region(:log => true) %>
<%= zip_code.to_region(:state_code => true) %>
'713301'.to_region #=> Asansol Bazar
'713301'.to_region(:state => true) #=> West Bengal
'713301'.to_region(:district => true) #=> Burdwan
'713301'.to_region(:country => true) #=> India
'713301'.to_region(:state_code => true) #=> WB
'713301'.to_region(:lat => true) #=> 23.6306
'713301'.to_region(:log => true) #=> 87.1196
'Asansol Bazar'.to_region.to_zip #=> 713301
'Mahil Gaila'.to_region.to_zip #=> 144506
- Fork it
- 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 new Pull Request