Example #1
0
 public function getJSONObject($defText = '', $defTitle = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $posArray = array();
     foreach ($this->polygonCoords as $mapLocation) {
         $posArray[] = array('lat' => $mapLocation->getLatitude(), 'lon' => $mapLocation->getLongitude());
     }
     $array = array('pos' => $posArray, 'onlyVisibleOnHover' => $this->isOnlyVisibleOnHover());
     return array_merge($parentArray, $array);
 }
Example #2
0
 /**
  * @since 3.0
  *
  * @param string $defText
  * @param string $defTitle
  *
  * @return array
  */
 public function getJSONObject($defText = '', $defTitle = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $array = array('ne' => array('lon' => $this->getRectangleNorthEast()->getLongitude(), 'lat' => $this->getRectangleNorthEast()->getLatitude()), 'sw' => array('lon' => $this->getRectangleSouthWest()->getLongitude(), 'lat' => $this->getRectangleSouthWest()->getLatitude()));
     return array_merge($parentArray, $array);
 }
Example #3
0
 public function getJSONObject($defText = '', $defTitle = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $array = array('centre' => array('lon' => $this->getCircleCentre()->getLongitude(), 'lat' => $this->getCircleCentre()->getLatitude()), 'radius' => intval($this->getCircleRadius()));
     return array_merge($parentArray, $array);
 }