Add the following snippet to the
<head> tag of your site.
To begin with the Localities Service, you need to build a new
AutocompleteService object passing the
key parameter corresponding to your project public key.
const key = 'woos-xxxx'; //your project public key let autocompleteService = new woosmap.localities.AutocompleteService(key);
Here is a simple sample to help you using the Localities JS API.
keyup event fired on the dedicated text
getQueryPredictions() is called and results displayed below.
To understand how to go deeper with the Localities JS API, please check the Localities JS API Reference.