Added the ability to lock the view to a layer.