csDoctrineActAsGeolocatablePlugin
2.0.1stable
for sf 1.4sf 1.3sf 1.2sf 1.1 and Doctrine
MIT
Configure your plugin using only YAML to pull latitude and longitude
information using the Google API. Specify the fields on your model
you want to use to retrieve the latitude and longitude, add a Google API key,
and the plugin will do the rest. Supports radius searches in miles and
kilometers.
Sponsored By Centre{source} interactive agency
Developers
| Name |
Status |
Email |
Brent Shaffer |
lead |
moc.ecruosertnec <<ta>> reffahsb
|
License
Copyright (c) 2009 Brent Shaffer
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.
Releases for sf 1.4
| Version |
License |
API |
Released |
|
2.0.1stable
|
MIT license |
2.0.1stable
|
29/08/2010 |
|
2.0.0stable
|
MIT license |
2.0.0stable
|
19/07/2010 |
Releases for sf 1.3
| Version |
License |
API |
Released |
|
2.0.1stable
|
MIT license |
2.0.1stable
|
29/08/2010 |
|
2.0.0stable
|
MIT license |
2.0.0stable
|
19/07/2010 |
Releases for sf 1.2
| Version |
License |
API |
Released |
|
2.0.1stable
|
MIT license |
2.0.1stable
|
29/08/2010 |
|
2.0.0stable
|
MIT license |
2.0.0stable
|
19/07/2010 |
Releases for sf 1.1
| Version |
License |
API |
Released |
|
2.0.1stable
|
MIT license |
2.0.1stable
|
29/08/2010 |
|
2.0.0stable
|
MIT license |
2.0.0stable
|
19/07/2010 |
|
1.0.0stable
|
MIT license |
1.0.0stable
|
25/04/2009 |
Changelog for release 2.0.1 - 29/08/2010
- Fixed Error message - option name "field" changed to "fields"
Other releases
Release 2.0.1 - 29/08/2010
- Fixed Error message - option name "field" changed to "fields"
Release 2.0.0 - 19/07/2010
Release 1.0.0 - 25/04/2009
- Initial creation of plugin
csDoctrineActAsGeolocatablePlugin
This plugin is for Doctrine only. It provides API integration with Google Maps to allow for the automatic fetching
of latitude and longitude for a given model. This is configurable for any field/fields on your model.
How It Works
Add the behavior to your model:
MyModel:
actAs: [Geolocatable]
Geolocatable requires the "fields" argument to work. This takes an array of fields use to determine
the latitude/longitude. Provide as many or as few fields as you want, but you must provide at least one:
MyModel:
actAs:
Geolocatable
fields: [city, state]
Methods
The Geolocatable plugin comes with some methods for geolocation:
Object Methods:
- refreshGeocodes( $url = null )
refreshes the geocodes for the object via the Google Maps API.
Table Methods
- addDistanceQuery( $query, $latitude, $longitude, $distance = null)
adds distance query to a preexisting query.
field "distance" on each object represents the distance away from the passed latitude and longitude.
If $distance is not null, results are limited to that distance from the given geocodes.
Please contact bshaffer@centresource.com for any comments or questions