ScaleBase.getItemsCount

Syntax

getItemsCount ();

Description

The getItemsCount method returns the number of scale elements.

Comments

Element numbers start with 0.

Example

To execute the example, the HTML page must contain the MapChart component (see Placing of Map on a HTML Page) 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.

function scaleSet() {

                scale = map.getFirstVisual().getBackground().getMapScale();

                count = scale.getItemsCount();

                alert("Setup completed for "+ count + " scale items." )

                map.draw();

            }

            map.Loaded.add(scaleSet);

After executing the example on loading the map a message that informs the user on the number of scale elements is displayed to the screen.

See also:

ScaleBase