prototype
prototype

Reputation: 3313

Django GeoIP get country by city name

I'm using GeoIP for geo location with django and it works fine - locates city, country etc. But what i want is to locate the country name if is searched the city name. Example:


Search: Madrid

Found country: Spain


Search: Paris

Found country: France


Is this possible with GeoIP and if it is, how?

Thanks!

Upvotes: 1

Views: 976

Answers (1)

Konrad Hałas
Konrad Hałas

Reputation: 5144

It's not possible. GeoIP can only map IP to country/city, that's all.

You should try experimental Google Places API - you can use it to check in which country eg. Madrid is.

Upvotes: 1

Related Questions