I need to implement the following.

The user begins to enter the name of the city or country, I get input and automatically substitute the location. Naturally, I wonder where to find the very base of cities and countries? Desirable in Russian.

I need to display the distance from the user, by location, to another area of ​​the city in a given country.

I think that there are ready-made solutions. Since the topic for me is new, I don’t even know where to look.

Update: It would be interesting to look at the script with areas of cities. It’s better to request all this wealth from trusted servers, I don’t want to keep it locally. Ideal option to use any Google service.

Update 2: Essentially they offer the same thing - download the database and do not request it. I also need a service, like Yandex maps, which can be accessed by passing the input line, and get the most suitable location at the output.

Update 3: While staying on Yandex maps. I will use geocoding.

2 answers 2

From Google: Google Maps API (limit on 2500 requests per day). An example of use .

    Well, in the net in general not to use the search.

    Base GeoIP - countries and cities, June 2011 (+ update script) .

    + use autocomplete on jQuery is valid.

    • Well, try to guess what to do next ... what's the problem I don’t understand, I gave directions, distance = it’s so hard to google? - Artem