converts layerPicker to be a dialog