Example #1
0
 public function getJSONObject($defText = '', $defTitle = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $array = array('ne' => array('lon' => $this->getBoundsNorthEast()->getLongitude(), 'lat' => $this->getBoundsNorthEast()->getLatitude()), 'sw' => array('lon' => $this->getBoundsSouthWest()->getLongitude(), 'lat' => $this->getBoundsSouthWest()->getLatitude()), 'image' => $this->getImage());
     return array_merge($parentArray, $array);
 }
 public function getJSONObject($defText = '', $defTitle = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $array = array('strokeColor' => $this->hasStrokeColor() ? $this->getStrokeColor() : '#FF0000', 'strokeOpacity' => $this->hasStrokeOpacity() ? $this->getStrokeOpacity() : '1', 'strokeWeight' => $this->hasStrokeWeight() ? $this->getStrokeWeight() : '2');
     return array_merge($parentArray, $array);
 }
Example #3
0
 /**
  * Returns an object that can directly be converted to JS using json_encode or similar.
  *
  * @since 1.0
  *
  * @param string $defText
  * @param string $defTitle
  * @param string $defIconUrl
  * @param string $defGroup
  * @param string $defInlineLabel
  *
  * @return object
  */
 public function getJSONObject($defText = '', $defTitle = '', $defIconUrl = '', $defGroup = '', $defInlineLabel = '', $defVisitedIcon = '')
 {
     $parentArray = parent::getJSONObject($defText, $defTitle);
     $array = array('lat' => $this->getLatitude(), 'lon' => $this->getLongitude(), 'alt' => $this->getAltitude(), 'address' => $this->getAddress(false), 'icon' => $this->hasIcon() ? MapsMapper::getFileUrl($this->getIcon()) : $defIconUrl, 'group' => $this->hasGroup() ? $this->getGroup() : $defGroup, 'inlineLabel' => $this->hasInlineLabel() ? $this->getInlineLabel() : $defInlineLabel, 'visitedicon' => $this->hasVisitedIcon() ? $this->getVisitedIcon() : $defVisitedIcon);
     return array_merge($parentArray, $array);
 }