API or database to load data for Country, State/province/region, and city select menus [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionanyone know of a solution? i have found online a select 开发者_如何学Cmenu for countries, but i need either an API or a database with every state/province and major city in each country.
Take a look at GeoNames. You can download (just about) everything they have and create your own local databases, or you can use their REST Webservice API. As an added bonus, they even have already made client libraries.
If you just want users to be able to select a location, you could use a search-based interface such as OSM Nominatim. You can download the data and install it yourself, or just use their web services (subject to usage limits). Indeed, you might be able to download the Nominatim database and write a different API to use menus to drill down.
精彩评论