clearLayers();
The clearLayers method clears child layers of a map.
To execute the example the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). A map with the Google topobase must also be loaded (see page with description of the MapChart.afterGoogleLoad property).
Clear layer with areas of a map based on Google topobase:
// Get map layer of the map var mainLayer = map.getLayer("MainLayer"); // Clear the layer with map areas mainLayer.clearLayers();
After executing the example the layer containing map areas is cleared:
See also: