> view the city closest to the one selected within 10km.
Ah okay, that is not what the autocomplete example does. It shows
things spelled a bit like the text entered so far, doesn't relate to
distance from any starting point.
If you want to find things within a distance of some point, you could
do something like
http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html