How it works

Import all the dependencies in your page’s head

<script src=""></script>
<script type="text/javascript" src=""></script>

<!-- These next two you should host by yourself in production -->
<!-- Download the latest version here -->
<link rel="stylesheet" src="/path/to/jquery.geocodify.css" />
<script type="text/javascript" src="/path/to/jquery.geocodify.min.js"></script>

Add an empty form to your page’s body and initialize it with instructions for what function to run when the user selects an address

<input id="geocoder" placeholder="Enter a location ..."></input>
<script type="text/javascript">
        onSelect: function (result) { alert(result); }

The example above will just alert the selected address in the browser. It’s a JavaScript representation of what is returned by the Google Maps geocoder.



A function that takes the Google geocoder’s result object and decides what to do with it, like it load it on a map, or redirect to another page, or whatever you need. Required.


A whitelist of address types allowed to appear in the results. Drawn from the set defined by Google’s geocoder. Optional. All types accepted by default.


A function for handling errors returned by the Google geocoder. Optional. Null by default.


A function for filtering results before they appear in the dropdown. Optional. Null by default.


Sets the number of characters that must be entered before the geocoder starts to automatically run. Optional. The default is five.


The text that appears when a search returns no results. Optional. The default is “No results found. Please refine your search.”


A function that treats the search string before it is passed to the geocoder. Optional. Null by default.


Instruct the geocoder to return results biased towards a particular region of the world. More information about the available codes can be found here. Optional. Null by default.


Instruct the geocoder to return results biased towards a bounding box presented in Google’s data format. Google’s documentation can be found here. Optional. Null by default.