Implement the layer selector.