public function jsonSerialize()
    {
        $geometries = [];
        foreach ($this->geometries as $geometry) {
            $geometries[] = $geometry->jsonSerialize();
        }

        return new \GeoJson\Geometry\GeometryCollection($geometries);
    }
public function jsonSerialize()
    {
        $geometries = [];
        foreach ($this->geometries as $geometry) {
            $geometries[] = $geometry->jsonSerialize();
        }

        return new \GeoJson\Geometry\GeometryCollection($geometries);
    }
public function jsonSerialize ( ) { $ geometries = [ ] ; foreach ( $ this -> geometries as $ geometry ) { $ geometries [ ] = $ geometry -> jsonSerialize ( ) ; } return new \ GeoJson \ Geometry \ GeometryCollection ( $ geometries ) ; }
Convert to GeoJson GeometryCollection that is jsonable to GeoJSON

@return \GeoJson\Geometry\GeometryCollection
Convert to GeoJson GeometryCollection that is jsonable to GeoJSON