How to cut a layer to show the area that just inside a polygon?

Hello everyone! I have a layer composed by multiple tiles, but how to hide the area outside an existed polygon?Just demonstrated as this picture~

polygon

This sounds similar to another thread, where I created and example sandcastle that shows one possible approach for only showing/loading the parts of a tileset that are contained in a polygon: How to load only 3dtiles inside the polygon? - #7 by Marco13

Thank you for asking my question! But there is no clippingPlanes property of a new layer according to the document of ImageryLayer, there are just “rectangle” and “cutoutRectangle” properties which can limit the visible portion of the imagery provider. But I don’t want to clip the layer straitly by west-east and north-south directions, the polygon entity may be not of a rectange type. :heartpulse:

Sorry, from the screenshot it was not apparent that this is in fact an imagery layer (the red circled part looked like a part of a tileset). I think that there is no way to cut out arbitrary shapes within imagery on the API level, beyond the cutout rectangle. But I’d like to stand corrected here.