layer_guess function

Guess the right type of layer based on current properties.