Required arguments
Option | Use | Default |
---|---|---|
onSelect | A function that takes the Google geocoder's result object and decides what to do with it, like it load it on a map, or redirect to another page, or whatever you need. | An ugly alert with the result's address. |
Optional arguments
Option | Use | Default | |
---|---|---|---|
acceptableAddressTypes | A whitelist of address types allowed to appear in the results. Drawn from the set defined by Google's geocoder. | All types accepted | |
errorHandler | A function for handling errors returned by the Google geocoder. | null | |
filterResults | A function for filtering results before they appear in the dropdown. | null | |
initialText | Sets a default string to appear when the box loads. | null | |
minimumCharacters | Sets the number of characters that must be entered before the geocoder starts to automatically run. | 5 | |
noResultsText | The text that appears when a search returns no results. | "No results found. Please refine your search." | |
prepSearchString | A function that treats the search string before it is passed to the geocoder. | null | |
regionBias | Instruct the geocoder to return results biased towards a particular region of the world. More information about the available codes can be found here. | null | |
viewportBias | Instruct the geocoder to return results biased towards a bounding box presented in Google's data format. Google's documentation can be found here. | null |