/** Retrieve the nearest finds to a lat lon point * */ public function nearestAction() { $lat = $this->_getParam('lat'); $long = $this->_getParam('long'); $distance = (int) $this->_getParam('distance'); $finds = new Finds(); $this->view->finds = $finds->getByLatLong($lat, $long, $distance); $this->view->distance = $distance; $this->view->lat = $lat; $this->view->long = $long; }