IMapIconScale.Apply

Syntax

Apply(Value: Double): IGxImage;

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, the ImageBox component named ImageBox1, and the UiMap component named UiMap1. UiMap1 is a data source for MapBox1. The UiMap1 component needs to have the connected map, the Regions layer of which contains only the icon indicator that uses the scale.

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;
    ImageVisual: IMapImageVisual;
    ImageProp: IMapVisualIconProperty;
    Scale: IMapIconScale;
Begin
    Map := UiMap1.Map;
    Layer := Map.Layers.FindByName("Regions");
    ImageVisual := Layer.Visuals.Item(0As IMapImageVisual;
    ImageProp := ImageVisual.Image;
    Scale := ImageProp.Scale;
    ImageBox1.Image := Scale.Apply(51);
End Sub Button1OnClick;

After executing the example the image that corresponds to the specified scale value is loaded to the ImageBox component.

See also:

IMapIconScale