ScaleBase.getCount

Syntax

getCount ()

Description

The getCount method returns the number of scale intervals.

Comments

Numbers start with 0.

Example

To execute the example, the HTML page must contain the MapChart components named map and MapMaster (see Example of Creating the MapMaster and MapChart), 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.

Add the scaleSet() function to be executed on map loading:

        function scaleSet() {

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

           scale.ItemsChanged.add(function (sender, args) {

              console.log(scale.getCount())

           })

        }

        map.Loaded.add(scaleSet);

After executing the example on changing value in the Tick Marks: value editor of the map wizard, the browser console displays the number of scale intervals.

See also:

ScaleBase