Worldwide location (country, region, city) select plugin for Rails, jQuery or Google Maps API?

后端 未结 2 1481
广开言路
广开言路 2021-02-08 19:04

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 acc

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-08 19:17

    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.

提交回复
热议问题