clearLayer(layerNode: HTMLElement);
layerNode. The DOM item corresponding to the layer to be cleared.
The clearLayer method clears a specified layer.
To execute the example the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). Clear all map layers:
// Get map layers
var layers = map.getLayers();
for (var i in layers) {
// Get layer
var layer = layers[i];
// Delete this layer
map.clearLayer(layer.getDomNode());
};
After executing the example all map layers are cleared:

See also: