Fixed opacity problem, accessing the portal layer id instead of the map layer
added another temporal layer for testing
minor: indentation