Autoaddress jQuery Plugin Instance Functions

Once the Autoaddress jQuery Plugin is initialized on your page you have several extra functions available to your plugin instance to add extra flexibility.

You can use these functions at any time after the plugin in initialized, i.e. in a Callback Event, page load, button clicks, etc..

There are two ways you can invoke the functions which is shown in the example below, you can just prefer the syntax you prefer.

How to call the Functions

   key : "YOUR_KEY"

//Calling Instance Functions Syntax #1
$('#myDiv').AutoAddress('setAddress','Sample Address');
$('#myDiv').AutoAddress('setLabel', 'placeHolderLabel', 'Enter Full Address or Postcode');
//Calling Instance Functions Syntax #2
$('#myDiv').AutoAddress().setAddress('Sample Address');
$('#myDiv').AutoAddress().set​Label('placeHolderLabel', 'Enter Full Address or Postcode');

Function List

Function Name Description
setAddress(string) When invoked will set the Address value (string) as the value for the search input field.
setLanguage(string) Change the language to be used by the plugin. Available languages are "EN" and "GA"
setCountry(string) Change the country search for the plugin. Available countries are "IE" and "GB"
setProfileName(string) Enable your custom address profile when called.
setLimit(string) Control the number of options to be returned from your searches.
setGeographicAddress(boolean) To use geographic address format for results.
setVanityMode(boolean) To use vanity address format for results, if available.
setAddressElements(boolean) Turn on or off address elements.
setDefaultState() Restore the default state of the plugin, removing options / message containers etc.
setLabel(string, string) Change label text.
showAutocomplete() Show Autocomplete for the address or postcode in the search input field.
clearAddress() When invoked will clear the search input field.