public function renderJsContainerRectangles(Map $map)
    {
        $output = array();

        foreach ($map->getRectangles() as $rectangle) {
            $output[] = sprintf(
                '%s.rectangles.%s = %s',
                $this->getJsContainerName($map),
                $rectangle->getJavascriptVariable(),
                $this->rectangleHelper->render($rectangle, $map)
            );
        }

        return implode('', $output);
    }