GeoDB Cities

FREEMIUM
Verified
Durch Michael Mogley | Aktualisiert a month ago | Data
Popularität

9.9 / 10

Latenz

62ms

Service Level

100%

Health Check

100%

Zurück zu allen Diskussionen

Find Region Cities request now includes County names?

Rapid account: LHCG Maps API
LHCG Maps API
5 years ago

A recent update to the Find Region Cities (/countries/{countrycode}/regions/{regioncode}/cities) request seems to have added County names to the results without any apparent differentiator between a county and a city. I need a clear way to differentiate between the two. Is there any way you can add some attribute to the results of the Find Region Cities request, or can you remove counties from the results altogether? It seems a bit counter-intuitive to have counties being returned by an API call that is explicitly named “Find Region Cities”.

Rapid account: Wirefreethought
wirefreethought Commented 5 years ago

Some more news for you. The cities endpoints now support a new ‘types’ parameter. This can have one (or both) of the following values: CITY, ADM2. Specifying both just gives back all city/admin-level-2 results - nonsensical right now, but in the future, there may be other types available. So if you want to just get back cities, set types=CITY. Swagger docs have been updated to reflect this.

Rapid account: Wirefreethought
wirefreethought Commented 5 years ago

To keep you from getting stuck, I just added a new ‘type’ attribute to each city in the results. This can be one of: ADM2, CITY. Swagger docs have also been updated (https://wirefreethought.github.io/geodb-cities-api-docs). The other features I described should be available sometime in the next couple weeks.

Rapid account: Wirefreethought
wirefreethought Commented 5 years ago

Hi. There was a request from another user to include additional ‘missing cities’ in Brazil. The missing cities were accounted for by updating the import process to include 2nd-level administrative divisions. I’m guessing that’s probably why you’re now seeing counties. The reason to include 2nd-level admin divisions in the city results is that often times these actually DO represent cities and towns, depending on the country.

Having said that, I’ll add a new type to the city results to allow you to differentiate. I will also provide an additional filter param to allow you to only explicitly return cities (or counties, if so desired). Maybe even a whole separate endpoint. Will update you here when this feature is available.

Nehmen Sie an der Diskussion teil - fügen Sie unten einen Kommentar hinzu:

Anmelden / Registrieren, um neue Kommentare zu veröffentlichen