MultiSearch Reference

MultiSearch Javascript API Reference
  1. ApiOptions object Specification 
  2. AutocompleteResponseItem object Specification 
  3. DetailsResponseItem object Specification 
  4. MultiApiOptions object Specification 
  5. autocompleteAddress function definition 
  6. autocompleteLocalities function definition 
  7. autocompleteMulti function definition 
  8. autocompletePlaces function definition 
  9. autocompleteStore function definition 
  10. detailsAddress function definition 
  11. detailsLocalities function definition 
  12. detailsMulti function definition 
  13. detailsPlaces function definition 
  14. detailsStore function definition 

ApiOptions object Specification  🔗


Properties
key Type: String

Authentication key to be able to call the API.

fallbackBreakpoint? Type: Number|False

Either false to prevent the API from being fallbacked or a number between 0 and 1 corresponding to the threshold of fallback. A value of 0 indicates that the results must contain at least one perfect match while 1 will match anything. If no value is specified, default values are applied for each API (1 for store, 0,4 for localities, 0,5 for address, 1 for places)

minInputLength? Type: Number

Empty result will be sent by the API and no fallback will be triggered if the input length does not reach the minInputLength value..

params Type: Object

List of the API params to send. Checkout: Woosmap Localities Woosmap Address Woosmap Store Google Places (Nb. The Places language parameter can be defined only at initialisation of the library)


AutocompleteResponseItem object Specification  🔗


Properties
id Type: String

Item identifier (for address API, this is an internal identifier of the library.)

api Type: 'localities'|'address'|'store'|'places'

The api the result was retrieved from

description Type: String

Contains the human-readable name for the returned result.

matched_substrings Type: Array

Contains an array with offset value and length. These describe the location of the entered term in the prediction result text, so that the term can be highlighted if desired.

highlight Type: String

HTML description in which the entered term in the prediction result text are in <mark>tags

types Type: Array

Array of types that apply to this item.

item Type: Object

The item returned by the API “as is”.


DetailsResponseItem object Specification  🔗


Properties
id Type: String

Item identifier (for address API, this is an internal identifier of the library.)

name Type: String

Item name

geometry Type: Object

Item geometry ({location:{lat, lng}})

formatted_address Type: String

String containing the human-readable address of this item.

types Type: Array

Array of feature types describing the given item (like locality or postal_town)

address_components Type: Array

Array containing the separate components applicable to this address. Each component has a long name (full text description or name of the address component), a short name (abbreviated textual name for the address component, if available) and types (array indicating the type of the address component which can be locality, street_number, country, route or postal_code)

item Type: Object

Item returned by the API “as is”.


MultiApiOptions object Specification  🔗


Properties
debounceTime? Type: Number

The amount of time in ms the autocomplete function will wait after the last received call before executing the next one.

localities? Type: ApiOptions

Options for the Woosmap Localities API.

address? Type: ApiOptions

Options for the Woosmap Address API.

store? Type: ApiOptions

Options for the Woosmap Store API.

places? Type: ApiOptions

Options for the Google Places API.


autocompleteAddress function definition  🔗

autocompleteAddress

Function
function(input:String,options?:ApiOptions,callback?:Function)

Return Value: [ 'Promise' ].<Array.<AutocompleteResponseItem>>

Query the autocomplete Woosmap Address API. Check out the API documentation

autocompleteLocalities function definition  🔗

autocompleteLocalities

Function
function(input:String,options?:ApiOptions,callback?:Function)

Return Value: [ 'Promise' ].<Array.<AutocompleteResponseItem>>

Query the autocomplete Woosmap Localities API. Check out the API documentation

autocompleteMulti function definition  🔗

autocompleteMulti

Function
function(input:String,options?:MultiApiOptions,callback?:Function)

Return Value: [ 'Promise' ].<Array.<AutocompleteResponseItem>>

Query the different autocomplete APIs defined in the apiOrder list. Depending on the fallbackBreakpoint and the minInputLength defined for each API, if the first API does not send revelant enough results, it will query the next one, until results are relevant or no other API is in the list.

autocompletePlaces function definition  🔗

autocompletePlaces

Function
function(input:String,options?:ApiOptions,callback?:Function)

Return Value: [ 'Promise' ].<Array.<AutocompleteResponseItem>>

Query the autocomplete Google Places API. Check out the API documentation

autocompleteStore function definition  🔗

autocompleteStore

Function
function(input:String,options?:ApiOptions,callback?:Function)

Return Value: [ 'Promise' ].<Array.<AutocompleteResponseItem>>

Query the autocomplete Woosmap Store API.

detailsAddress function definition  🔗

detailsAddress

Function
function(id:String,callback?:Function)

Return Value: [ 'Promise' ].<DetailsResponseItem>

Query the geocode Woosmap Address API to get details of an address. Check out the API documentation

detailsLocalities function definition  🔗

detailsLocalities

Function
function(id:String,callback?:Function)

Return Value: [ 'Promise' ].<DetailsResponseItem>

Query the details Woosmap Details API. Check out the API documentation

detailsMulti function definition  🔗

detailsMulti

Function
function(id:String,api:'localities'|'address'|'store'|'places',callback?:Function)

Return Value: [ 'Promise' ].<DetailsResponseItem>

Query the details api to get details of an item.

detailsPlaces function definition  🔗

detailsPlaces

Function
function(id:String,callback?:Function)

Return Value: [ 'Promise' ].<DetailsResponseItem>

Query the details Google Places API to get details of a place. Check out the API documentation

detailsStore function definition  🔗

detailsStore

Function
function(id:String,callback?:Function)

Return Value: [ 'Promise' ].<DetailsResponseItem>

Query the search Woosmap Store API to get details of a store. Check out the API documentation

Was this article helpful?
Have more questions? Submit a request