undefined layer[0] due to empty $viewport.find(".current-map-layer")
Merge pull request #8 from raudus/master

Hello there! Please take the changes!