Ruby地理位置Gem /插件 [英] Ruby Geolocation Gem/Plugins

查看:123
本文介绍了Ruby地理位置Gem /插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是什么是可用的(最好的)红宝石基于IP的地理位置宝石/插件?

他们在功能,性能和易用性方面相互比较(例如,他们是否与Web服务交互,或需要单独的数据库等)?

我希望任何使用过的人都可以分享他们的经验并提供建议。 你目前最好的选择可能是GeoKit为宝石 http://github.com/andre/geokit-gem http://github.com/andre/geokit-rails 插件)。它内置了Yahoo和Google API密钥的功能,距离计算助手,反向地理位置等。然而,GeoMereLaal( http://github.com/parolkar/geo_mere_laal/ )基于W3C Geolocaton API的工作草案。由于我只能使用更多的地理定位方法(GPS,WiFi,cookies,IP),因此我只能在Firefox中使用它,但它会更准确,因为它受更多浏览器支持。


What are the available (best) ruby IP-based geolocation gem/plugins?

How do they compare to one another in terms of functionality, performance and ease of use (e.g. do they interact with a web service, or require a separate database, etc.) ?

I'm hoping anyone that has used some can share their experience and give recommendations.

解决方案

Your current best bet is probably GeoKit (http://github.com/andre/geokit-gem for gem, http://github.com/andre/geokit-rails for plugin). It has built in functionality for Yahoo and Google API keys, distance calculation helpers, reverse geolocation, etc.

However, GeoMereLaal (http://github.com/parolkar/geo_mere_laal/) is based on the working draft of the W3C Geolocaton API. It's very limited at the moment as I could only get it to work in Firefox, but it will be more accurate as it's supported by more browsers since it uses more methods of Geolocation (GPS, WiFi, cookies, IP).

这篇关于Ruby地理位置Gem /插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆