IMapNumericScale.Apply

Syntax

Apply(Value: Double): Double;

Parameters

Value. The value, for which the scale should be applied.

Description

The Apply method applies the scale to the specified non-empty value.

Example

Executing the example requires a form with the following components: the Button component named Button1, the MapBox component named MapBox1, and the UiMap component named UiMap1. UiMap1 is a data source for MapBox1. The UiMap1 component must have a connected map, which Regions layer contains only the bar indicator, that uses the numeric scale to determine the height.

The example is a handler of the OnClick event for the Button1 component.

Add links to the ExtCtrls, Forms, and Map system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Map: IMap;
    Layer: IMapLayer;
    BarVisual: IMapBarVisual;
    NumProp: IMapVisualNumericProperty;
    Scale: IMapNumericScale;
    s: Double;
Begin
    Map := UiMap1.Map;
    Layer := Map.Layers.FindByName("Regions");
    BarVisual := Layer.Visuals.Item(0As IMapBarVisual;
    NumProp := BarVisual.Height;
    Scale := NumProp.Scale;
    s := Scale.Apply(55);
End Sub Button1OnClick;

After executing the example the "S" variable stores the value that corresponds to the specified scale value.

See also:

IMapNumericScale