Skip to content
No description or website provided.
JavaScript PHP CSS
Find file
Latest commit 17c6a9b @lupomontero Merge pull request #1 from bitdeli-chef/master
Add a Bitdeli Badge to README

README.md

jQuery.locationPicker()

This plugin takes an input field and turns it into a "Facebook style" location (town/city and country) picker. The "picker" suggests locations found searching for what the user is typing using Google's Geocoding API.

So far it seems to work fine (meaning I've testes) on:

  • Google Chrome 13.0.782.107
  • Safari 5.1
  • FireFox 5.0.1
  • Opera 11.50
  • iOS (tested on iOS Simulator both for iPhone and iPad)
  • Internet Explorer 8

The plugin is built on top of jQuery.suggest.

Demo

http://demos.e-noise.com/jQuery.locationPicker/

Example

...
<input name="loc" id="loc">

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="js/jquery.suggest.js"></script>
<script src="js/jquery.location-picker.js"></script>
<script>
jQuery(document).ready(function ($) {
  $('#loc').locationPicker();
});
</script>
...

Notes

In order to work around the "same domain policy" affecting XHR requests I have included a PHP script that acts as a proxy.

Bitdeli Badge

Something went wrong with that request. Please try again.