Skip to content

ilbesculpi/cakephp-geolocation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

CakePHP GeoLocation Tools

CakePHP 2.x tools for searching and geotagging data.

Installation

  1. Create your table with latitude and longitude fields.

  2. Place GeoLocationBehavior into app/Model/Behavior

  3. Add the Behavior to your Model:

class Item extends AppModel {
	public $actsAs = array('GeoLocation');
}

Usage

Perform search on your Controller:

public function search() {
	$results = $this->Item->search('all', array (
		'center' => array (
			'latitude'  => 40.708,
			'longitude' => -74.002,
			'radius'    => 5.0	// Kmts
		)
	));
	
	pr( $results );
}

About

CakePHP 2.x tools for searching and geotagging data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages