ScaleBase.getValuesPair

Syntax

getValuesPair (index: Number);

Parameters

index. Interval index.

Description

The getValuesPair method returns interval border by its index.

Example

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.

On map loading set new borders for the third scale interval and show them in the screen:

        function scaleSet() {

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

            legend = map.getLegends().MapLegend0;

            legend.show();

            scale.setValue(1, 20);//Set first border of the third interval

            scale.setValue(2, 40);//Set second border of the third interval

            values = scale.getValuesPair(2);//Get interval borders

            legend.draw();//refresh the legend

            alert("New interval borders: " + values);

        }

        map.Loaded.add(scaleSet);

After executing the example new borders are set for the third scale intervals: 20 and 40:

A message with new borders of the third intervals will appear.

See also:

ScaleBase