IMapNumericScale.Apply

Syntax

Apply(Value: Double): Double;

Parameters

Value - value that needs the scale to be applied to.

Description

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

Example

Executing the example requires a form, a button named Button1 on the form, the UiMap component named UiMap1 that is a data source for the MapBox component. The UiMap1 component must have a connected map, which Regions layer contains only the bar factor, that uses the numeric scale to determine the height.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Map: IMap;

Layer: IMapLayer;

BarVisual: IMapBarVisual;

NumProp: IMapVisualNumericProperty;

Scale: IMapNumericScale;

s: Integer;

Begin

Map := UiMap1.Map;

Layer := Map.Layers.FindByName("Regions");

BarVisual := Layer.Visuals.Item(0) As 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