示例#1
0
文件: KML.php 项目: cdyweb/php-libkml
 public function __toString()
 {
     $output = array();
     $output[] = sprintf("<?xml version=\"1.0\" encoding=\"%s\"?>", $this->encoding);
     $output[] = sprintf("<kml xmlns=\"http://www.opengis.net/kml/%s\">", $this->version);
     if (isset($this->feature)) {
         $output[] = $this->feature->__toString();
     }
     $output[] = '</kml>';
     return implode("\n", $output);
 }
示例#2
0
 public function __toString()
 {
     $parent_string = parent::__toString();
     $output = array();
     $output[] = $parent_string;
     foreach ($this->features as $feature) {
         $output[] = $feature->__toString();
     }
     return implode("\n", $output);
 }
示例#3
0
 public function __toString()
 {
     $parent_string = parent::__toString();
     $output = array();
     $output[] = $parent_string;
     if (isset($this->color)) {
         $output[] = sprintf("<color>%s</color>", $this->color);
     }
     if (isset($this->drawOrder)) {
         $output[] = sprintf("<drawOrder>%s</drawOrder>", $this->drawOrder);
     }
     if (isset($this->icon)) {
         $output[] = $this->icon->__toString();
     }
     return implode("\n", $output);
 }