removeShape(id: String, notDispose: Boolean);
id. ID of the map layer area.
notDispose. Attribute indicating whether a map layer area should be deleted only from the layer. Available values:
true. The area should be deleted only from the map layer.
false. It is necessary to delete entirely the map layer area (default).
The removeShape method deletes the map layer area.
To execute the example the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). Delete the map layer area with the RU-KYA identifier:
var layer = map.getLayer("Regions"); layer.removeShape("RU-KYA");
After executing the example the map layer area with the RU-KYA ID was deleted:
See also: