Ejemplo n.º 1
0
 /** Get the monuments from the model using the lat/lon pair
  * 
  * @param double $lat
  * @param double $long
  */
 public function getMonuments($lat, $long)
 {
     $mons = new ScheduledMonuments();
     $smrs = $mons->getSMRSNearby($lat, $long);
     if (count($smrs)) {
         return $this->buildHtml($smrs);
     } else {
         return false;
     }
 }
Ejemplo n.º 2
0
 /** Get the data
  * @access public
  * @return object
  * @todo move data call to solr
  */
 public function getMonuments()
 {
     if ($this->getLat() && $this->getLon()) {
         $mons = new ScheduledMonuments();
         $smrs = $mons->getSMRSNearby($this->getLat(), $this->getLon());
         return $this->buildHtml($smrs);
     }
 }
Ejemplo n.º 3
0
 /** Get the data from the model
  * @access public
  * @param float $lat
  * @param float $lon
  * @param integer $distance
  * @return boolean
  */
 public function getData()
 {
     $coords = array($this->getLat(), $this->getLon());
     if (array_filter($coords)) {
         $smr = new ScheduledMonuments();
         return $smr->getSMRSNearby($this->getLat(), $this->getLon(), $this->getDistance());
     } else {
         return false;
     }
 }