World Cities

ÜCRETSİZ PREMIUM
Taraf Andres Olvera | Güncelleyen il y a 8 jours | Location
Popülerlik

9.2 / 10

Gecikme

607ms

Hizmet Düzeyi

100%

Health Check

N/A

Tüm Tartışmalara Dön

List of countries and cities

Rapid account: Robin Sekvard
robin.sekvard
il y a 4 ans

Is it possible to list all countries to dropdown component to choose the one you want and then make a list of cities to choose one according to the chosen country?

Rapid account: Andruxnet
andruxnet Commented il y a 4 ans

Hi,

Currently there’s no option to list all countries, because the query parameter is required – although the docs in the API say it isn’t but that’s because I can’t get to modify the settings of the API.

Anyway, what you can do is get a list of countries elsewhere, and then put those in your first dropdown. Then, when the user selects a country, just use it as the query param for this API and set the searchby param to “country”. This will get you a list of all cities in the selected country, then you can just grab all unique cities and show them in a second dropdown.

Hope that helps.

Aşağıya yorum ekleyerek tartışmaya katılın:

Yeni yorumlar göndermek için giriş yapın / kaydolun