clear();
The clear method clears a map layer.
To execute the example HTML page must contain object of the PP.MapLayer type (see page with description of the MapLayer.addSubLayer) property named layer. Clear all child layers:
var parentLayer = getParentLayer();
for (var i in parentLayer.getSubLayers()) {
var layer = parentLayer.getSubLayers()[i];
// Clear a layer
layer.clear();
}
// Refresh a map
map.refresh();
After executing the example, the map layer with bar, pie and bubble factors is removed.
See also: