There are many (about 2400 entries) names of ski resorts. In general, each of them is exactly in google maps .

It is necessary to make a script that will go through all and give me the coordinates for each record.
In the simplest case, it is clear how to do, and how best to identify the error? I think that an error can be considered if several results are returned, then run additional refinement queries? Or save everything and then manually check for each one, but it's not very good with your hands - 2400 records will be checked. :)

Tell me the algorithm is optimal, or maybe there are some useful things in api for such a task.



    1 answer 1

    You can, in Google Map v.3 there is a google.maps.Geocoder class. It implements the search for coordinates by addresses and names of objects. The result is an array with names and coordinates. If the result is not unambiguous, then the array will consist of several sets of coordinates. There are examples here.

    • thanks, look =) - stasych Nov.