IMapColorScale.AutoSetupEx

Syntax

AutoSetupEx(

Layer: IMapLayer;

DataAdapter: Object;

Count: Integer;

StartColor: IGxColor;

EndColor: IGxColor);

Parameters

Layer. Map layer.

DataAdapter. Cube value that corresponds to territory.

Count. Number of scale tick marks.

StartColor. Start gradient color.

EndColor. End gradient color.

Description

The AutoSetupEx method executes color scale autoset: it applies the gradient fill and calculates (Value) for scale tick marks.

Example

The example requires the Report object of the IPrxReport type. The regular report sheet must contain the map, for which a map indicator was created.

Add links to the Drawing, Map, Report, Tab system assemblies.

Sub UserProc;
Var
    Report: IPrxReport;
    Map : IMap;
    Layer : IMapLayer;
    Visual: IMapAreaVisual;
    MapScale : IMapColorScale;
    a,b : IGxColor;
Begin
    Map := (Report.Sheets.Item(0As IPrxTable).TabSheet.Objects.Item(0).Extension As IMap;
    Layer := Map.Layers.FindByName("Regions");
    Visual := Layer.Visuals.Item(0As IMapAreaVisual;
    a := New GxColor.CreateRGB(120125225);
    b := New GxColor.CreateRGB(170115225);
    MapScale := Report.Scales.Item(0).MapScale As IMapColorScale;
    MapScale.AutoSetupEx(Layer, Visual.DataAdapter, 6, a, b);
End Sub UserProc;

After executing the example scale tick mark values are calculated and the gradient is set.

See also:

IMapColorScale