Rails 地理编码宝石
我过去使用过 GeoKit 和acts_as_geocodable。我喜欢 GeoKit,但它缺少像named_scopes 这样更好的功能。我不是 acts_as_geocodable 的忠实粉丝,因为它将地址数据复制到自己的表中。
最近,这些宝石似乎维护不足。
有哪些积极维护的宝石?
I've used GeoKit and acts_as_geocodable in the past. I like GeoKit, but its missing nicer features like named_scopes. I'm not a huge fan of acts_as_geocodable because it duplicates address data into its own table.
Lately, these gems seem under-maintained.
What are some actively maintained gems out there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我维护地理编码器 gem:
http://rubygems.org/gems/geocoder
源代码:
http://github.com/alexreisner/geocoder
我可以告诉你它正在积极维护,因为我正在开发 Rails 3当我写这篇文章时兼容性!它的设计非常简单,同时提供最常用的地理编码功能。它提供命名范围并且不重复任何数据。
I maintain the Geocoder gem:
http://rubygems.org/gems/geocoder
Source code:
http://github.com/alexreisner/geocoder
I can tell you it's actively maintained because I'm working on Rails 3 compatibility as I write this! It's designed to be very simple, while providing the most commonly-used geocoding features. It provides named scopes and doesn't duplicate any data.
地理编码器的插件版本对我来说非常有用。请注意,您必须将“scope”重命名为“named_scope”才能使其在低于rails 3的任何版本中工作。
Plugin version of geocoder is working great for me. Note that you have to rename "scope" to "named_scope" to get it to work in anything less than rails 3.
有一个 'geokit-rails3' gem 也可以进行地理编码和反向地理编码:
https://github.com/ jlecour/geokit-rails3
它提供了多种地理编码器,例如 GoogleGeocoder 和 YahooGeocoder,因此您可以根据您要渲染的地图选择最合适的一种。
There is a 'geokit-rails3' gem can also do geocoding and reverse geocoding:
https://github.com/jlecour/geokit-rails3
It provide multiple geocoders like GoogleGeocoder and YahooGeocoder, So you can choose the most proper one according to your which map you are rendering.