setting map for layer if layer is shown