Esempio n. 1
0
 /**
  * @since 3.0
  *
  * @param string $defText
  * @param string $defTitle
  *
  * @return array
  */
 public function getJSONObject($defText = '', $defTitle = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $posArray = array();
     foreach ($this->coordinates as $mapLocation) {
         $posArray[] = array('lat' => $mapLocation->getLatitude(), 'lon' => $mapLocation->getLongitude());
     }
     $posArray = array('pos' => $posArray);
     return array_merge($parentArray, $posArray);
 }
 public function getJSONObject($defText = '', $defTitle = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $array = array('fillColor' => $this->hasFillColor() ? $this->getFillColor() : '#FF0000', 'fillOpacity' => $this->hasFillOpacity() ? $this->getFillOpacity() : '0.5');
     return array_merge($parentArray, $array);
 }