Beispiel #1
0
 /**
  * (non-PHPdoc)
  * @see EGMapKMLNode::toXML()
  */
 public function toXML()
 {
     $this->checkNode('name');
     $this->checkNode('description');
     $this->checkNode('styleUrl');
     return parent::toXML();
 }
Beispiel #2
0
 /**
  * (non-PHPdoc)
  * @see EGMapKMLNode::toXML()
  */
 public function toXML()
 {
     $this->checkNode('color');
     $this->checkNode('width');
     $result = CHtml::openTag('Style', array('id' => $this->id));
     $result .= parent::toXML();
     $result .= CHtml::closeTag('Style');
     return $result;
 }
Beispiel #3
0
 /**
  * (non-PHPdoc)
  * @see EGMapKMLNode::toXML()
  */
 public function toXML()
 {
     $icon = new EGMapKMLNode('Icon');
     if (!is_null($this->href)) {
         $icon->addChild(new EGMapKMLNode('href', $this->href));
     }
     $this->addChild($icon);
     $result = CHtml::openTag('Style', array('id' => $this->id));
     $result .= parent::toXML();
     $result .= CHtml::closeTag('Style');
     return $result;
 }
Beispiel #4
0
 /**
  * (non-PHPdoc)
  * @see EGMapKMLNode::toXML()
  */
 public function toXML()
 {
     $this->checkNode('extrude');
     /**
      * coordinate
      * A single tuple consisting of floating point values for longitude, latitude, and altitude (in that order). 
      * Longitude and latitude values are in degrees
      * altitude values (optional) are in meters above sea level
      * Do not include spaces between the three values that describe a coordinate.
      */
     if (!is_null($this->latitude) && !is_null($this->longitude)) {
         $this->addChild(new EGMapKMLNode('coordinates', $this->longitude . ',' . $this->latitude . ',' . $this->elevation));
     }
     return parent::toXML();
 }
Beispiel #5
0
 /**
  * (non-PHPdoc)
  * @see EGMapKMLNode::toXML()
  */
 public function toXML()
 {
     $node = new EGMapKMLNode('LinearRing');
     $node->addChild(new EGMapKMLNode('coordinates', $this->coordinates));
     $parentNode = new EGMapKMLNode($this->boundary ? 'outerBoundaryIs' : 'innerBoundaryIs');
     $parentNode->addChild($node);
     $this->addChild($parentNode);
     return parent::toXML();
 }
 /**
  * (non-PHPdoc)
  * @see EGMapKMLNode::toXML()
  */
 public function toXML()
 {
     $this->addChild(new EGMapKMLNode('altitudeMode', 'relative'));
     $this->addChild(new EGMapKMLNode('coordinates', $this->coordinates));
     return parent::toXML();
 }
Beispiel #7
0
 /**
  * 
  * Adding an externally created Tag at the end of its 'body' section
  * Note: this method does not validates the tag
  * @param EGMapKMLNode $tag
  * @return string id of the inserted Tag
  */
 public function addTag(EGMapKMLNode $tag)
 {
     if (null === $this->elements->itemAt('body')) {
         $this->elements->add('body', new CMap());
     }
     $name = uniqid();
     $this->elements->itemAt('body')->add(uniqid(), $tag->toXML());
     return $name;
 }