Ruby 地理定位宝石/插件 [英] Ruby Geolocation Gem/Plugins

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

问题描述

什么是可用的(最好的)基于 ruby​​ IP 的地理定位 gem/插件?

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

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

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.

推荐答案

你目前最好的选择可能是 GeoKit (http://github.com/andre/geokit-gem 对于 gem,http://github.com/andre/geokit-rails 用于插件).它内置了 Yahoo 和 Google API 密钥、距离计算助手、反向地理定位等功能.

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.

但是,GeoMereLaal (http://github.com/parolkar/geo_mere_laal/) 是基于关于 W3C Geolocaton API 的工作草案.目前它非常有限,因为我只能让它在 Firefox 中工作,但它会更准确,因为它使用更多的地理定位方法(GPS、WiFi、cookie、IP),因此得到了更多浏览器的支持.

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 地理定位宝石/插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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