"minimumTerrainLevel" for multiple layers

I want to set a “minimumTerrainLevel” option to the one of multiple imagery layers.
I read the post , “Preventing use of higher level tiles when lower level ones are unavailable (WMTS)”.Is It for single layer? How about multiple layers?

Thank you.

You should be able to pass those options on each imagery layer you want to set it on. Does that not work for you?

I misunderstood that “layers.add(layer,option)” can not be used for multiple layers.
My new code works well.
Thank you.