No description, website, or topics provided.
JavaScript PHP CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
demo
src
.gitignore
GPL-LICENSE.txt
MIT-LICENSE.txt
Makefile
README.md
version.txt

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