Jason
Jason

Reputation: 15358

How to make a Google Maps address - like lookup

You've probably all seen the maps.google.com.au address lookup. Start typing into the text box and your address auto completes in the list before you've finished. It also bolds the matching sections of the text that link to what you are typing.

I've used both the javascript api of maps and the http api. The geocoding seems to do something decent with the matches but i'm not entirely sure how one would go about getting this to work.

Anyway have a tutorial or a quick five step process that they would recommend I follow to get this feature going?

Upvotes: 2

Views: 669

Answers (1)

Dennis G
Dennis G

Reputation: 21778

The feature you are looking for is "find as you type" or "suggest as you type" or AJAX live search.

To get the functionality via the Maps API is possible as any other find as you type solution. For each key entered into your search box you already send the request to the server and see what matches the entered text so far. The problem is that you can only send so many requests to google before you get a 620 (too many requests) error. Having a find-as-you-type mechanism is usually easier when you have your own small DB which you can query, that is faster and you won't have problems with too many requests.

Some links with tutorials:

Upvotes: 1

Related Questions