If layers is a string, split them to a array
reset toc when layer is loaded