Geocoder.ca Autocomplete class in javascript
A Javascript Class to use Geocoder.ca geocoder autocomplete API for Canadian postal addresses.
Overview
This Class is designed for use only with geocoder.ca
You can use this library without any dependecies
Installation
simply include the script in <script> tag
Start Using
<input id="test" name="test" class="form-control"/>
var autocomplete=new autocomplete({
input:document.getElementById("test"),
key:'your auth code',
itemtemplate:'<a href="http://geocoder.ca/?locate={{geocodeaddr}}" class="list-group-item list-group-item-action flex-column align-items-start"> \
<img width="24px" src="img/geocodelogo.svg"/> {{geocodeaddr}} <span class="float-right badge badge-warning"> > </span> </a>'
});
Options
input / required / the input node required to make the autocomplete input
key / required / the api key obtained from geocoder.ca/api
itemtemplate / optional / the html template used to show the autocomplete results