Esempio n. 1
0
 /**
  * @param Polygon $polygon
  * @param bool $inferOuter
  *
  * @return $this
  */
 public function addPolygon(Polygon $polygon, $inferOuter = true)
 {
     if (!$inferOuter) {
         $this->innerPolygons[] = $polygon;
     } else {
         if (count($this->points) === 0) {
             foreach ($polygon->getPoints() as $point) {
                 $this->points[] = $point;
             }
             $this->isHole = $polygon->isHole();
         } else {
             $this->addPolygon($polygon, false);
         }
     }
     //        $this->innerPolygons[] = $polygon;
     return $this;
 }