public function divideMapNodes($map, $aspect)
    {
        $aspect    = !$aspect;
        $divisions = $map->getSize();
        $total     = $map->getTotalSize();
        foreach ($map->getChildren() as $node) {
            if (!$node->isLeaf()) {
                $dist = $node->getTotalSize() / $total * 100;
            } else {
                $dist = 1 / $total * 100;
            }
            if ($aspect) {
                $horiz = $dist;
                $vert  = 100;
            } else {
                $horiz = 100;
                $vert  = $dist;
            }
            $this->paintRectangleStart($node, $horiz, $vert);
            $this->divideMapNodes($node, $aspect);
            $this->paintRectangleEnd();
        }
    }