removeItemAt (index: Number);
index. Scale element index.
The removeItemAt method removes scale item by specified index.
To execute the example, the HTML page must contain the MapChart (see Placing of Map on a HTML Page) component named map, XML file with settings of map and the Russia.svg topobase.
The XML file must contain settings of the fill factor that is the first located in the list of map factors. Fill background - dependency object, for which scale is set up that contains values of the Brush type. The XML file must also have legend set up with the MapLegend0 identifier.
Remove the first scale item and the first border of scale interval.
scale = map.getFirstVisual().getBackground().getMapScale();
legend = map.getLegends().MapLegend0;
scale.removeItemAt(0);//Remove the first scale item
scale.removeValueAt(0);//Remove first border of scale intervals
legend.draw();//Redraw the legend
map.draw();//Redraw the map
After executing the example the first scale item and the first borders of scale intervals are removed, and map and legend are redrawn.
See also: