Made optional the drawing of legend for overlay layer.