Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
JavaScript PHP CSS
branch: master

Merge pull request #1 from bitdeli-chef/master

Add a Bitdeli Badge to README
latest commit 17c6a9b212
@lupomontero authored
Failed to load latest commit information.
build
demo Fixed bug creating settings object...
src Fixed bug creating settings object...
.gitignore Added git ignore file
GPL-LICENSE.txt Initial commit
MIT-LICENSE.txt Initial commit
Makefile Cleaning up makefile
README.md Add a Bitdeli badge to README
version.txt Initial commit

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.