Legend is now automatically opened whenever a layer is shown