Open this page in the API Guide

LayerViewModel.clearLayer Method

Remove all the design objects from the layer.