Allow layer source to be set
Allow source to be set with set method as well
Allow source to be set after layer construction
Merge pull request #2856 from tschaub/set-source

Allow layer source to be set.