Adds support for layers in tilecache.