sfGeoCompletePlugin - 1.0.0

Provides an autocomplete widget for entering the address of a location in a single input field using Google Maps v3 Geocoder

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
The release "Oz" does not exist for plugin "sfGeoCompletePlugin".
sfGeoCompletePlugin 1.0.0stable for sf 1.2sf 1.1 MIT
Plugin image
4
users
Sign-in
to change
your status

sfGeoCompletePlugin provides a widget that has an address input field and an associated auto-complete dropdown that shows suggestions as the user types in a location.

The suggestions are provided from the Google Maps GeoCoder v3. Since the geocoder runs on the user's browser, this implementation is very lightweight and also will not be limited by the Google's per IP request limits.

The sfWidgetFormInputGeoComplete can be used to replace all the address fields(street, city, postal code, country) with one "address" field. As the user types in an address, the field shows suggestions.

With this approach, the address quality increases because for each match Google GeoCoder v3 returns a structured set of results that contain the separate parts of an address, including the latitude and longitude.

This widget requires the sf_prototype_web_dir to be defined in your project.

To use, publish assets:

./symfony plugin:publish-assets

and simply include the widget in your form's configure method:

$this->widgetSchema['location'] = new sfWidgetFormInputGeoComplete();

Demo at http://ezkode.com/geocomplete/

Oz Basarir

Developers

Name Status Email
gravatar Oz Basarir lead moc.edokze <<ta>> zo

License

Show source

Copyright (c) 2005-2009 Oz Basarir ezkode.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.