The Singleline workflow provides address search in Singleline mode where an address can be searched on by entering it in a single textbox. Once this workflow is enabled, sample.html will render additional html elements:
Simple integration
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Singleline Address Search</title>
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="js/singleline.js"></script>
</head>
<body>
</body>
</html>
Define a <div>
element in the <body>
tag. The <div>
element will be the container of the UI elements that will be auto-generated by the singleline.js script. In this instance, it is named as "container".
Define a <textarea>
element in the <body>
tag. The <textarea>
element will be used to display the address validation result:
<body>
<br />
<textarea id="result" style="width:330px; height:630px">
</textarea>
</body>
Initialize the search by selecting the <div>
element and calling the singlelineSearch function.
Assign both the onSuccessHandler and onErrorHandler functions:
<body>
<br>
<textarea id="result" style="width:330px;height:630px"></textarea>
</body>