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

        return new \GeoJson\Geometry\MultiPolygon($polygons);
    }
public function jsonSerialize()
    {
        $polygons = [];
        foreach ($this->polygons as $polygon) {
            $polygons[] = $polygon->jsonSerialize();
        }

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

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