moved layer creation into a function so the renderers can override it when two layers are needed
Merge pull request #344 from kneemer/move-layer-creation-into-function

moved layer creation into a function so renderer plugin can override it