全球位置(国家,地区,城市)选择Rails,jQuery或Google Maps API的插件? [英] Worldwide location (country, region, city) select plugin for Rails, jQuery or Google Maps API?

查看:604
本文介绍了全球位置(国家,地区,城市)选择Rails,jQuery或Google Maps API的插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有插件可以帮助为国家,地区和城市创建下拉菜单?首先用户选择国家,然后他根据自己选择的国家更新其地区下拉菜单,然后从第三个菜单中选择地区,然后从该城市选择地区。 可以为Ruby on Rails,jQuery或者通过google maps api提供javascript解决方案吗? Freebase建议 jQuery插件提供了非常漂亮的自动完成功能,可以在下拉菜单中提供建议,并提供Freebase / Wiki鼠标悬停的样式上下文信息。您可以将他们的建议限制在国家,城市,美国各州等。



正确完成后,这甚至可以避免需要三个单独的下拉菜单。当然,这需要使用Freebase特定的地理本体 - 它们对国家,州和城市的分层观点。

我不确定任何预制插件,但是其他地名词典( Yahoo!GeoPlanet GeoNames )可能对您有用,如果您需要您在建模国家,州和城市时的具体细节等级。

Is there any plugin which will help to create a dropdown menus for countries, regions and cities? At first user chooses country, then he has his region dropdown menu updated according to which country he has chosen, he chooses region and after that from 3rd menu a city.

Plugin can be either for Ruby on Rails, jQuery or maybe javascript solution through google maps api?

解决方案

The Freebase Suggest jQuery plug-in provides pretty slick auto-complete functionality that provides suggestions in a drop-down, complete with Freebase/Wiki-style context info on mouseover. You can limit their suggestions to countries, cities, US states, etc.

Done properly, this might even avoid the need for three separate dropdowns. Of course, this would require using Freebase's particular geographic ontology -- their hierarchical view of countries, states and cities.

I'm not sure of any pre-built plugins, but other gazetteers (Yahoo! GeoPlanet, GeoNames) may be useful if you need a particular level of detail in your modeling of countries, states and cities.

这篇关于全球位置(国家,地区,城市)选择Rails,jQuery或Google Maps API的插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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