Coding style.
Add switchlayer code from makina-corpus.org.
Refactor layer creation to use switchLayer configuration.
Update api.php to document use of switchlayer in map config.