Ejemplo n.º 1
0
 /**
  * @param Geometry $component
  *
  * @throws \Kdyby\Extension\GeoJson\InvalidArgumentException
  */
 protected function add(Geometry $component)
 {
     if (!$component instanceof Point) {
         throw new InvalidArgumentException('LineString composes of Points, ' . get_class($component) . ' given.');
     }
     parent::add($component);
 }
Ejemplo n.º 2
0
 /**
  * @param Geometry $component
  *
  * @throws \Kdyby\Extension\GeoJson\InvalidArgumentException
  */
 protected function add(Geometry $component)
 {
     if (!$component instanceof Polygon) {
         throw new InvalidArgumentException('MultiPolygon composes of Polygons, ' . get_class($component) . ' given.');
     }
     parent::add($component);
 }