IMapLegend.MarkerSize

Syntax

MarkerSize: Double;

Description

The MarkerSize property determines legend marker size.

Comments

To determine legend marker type, use IMapLegend.MarkerType.

Example

Executing the example requires that the repository contains a form containing the components:

It is also required to have a regular report containing a map with enabled legend that is a data source for UiReport1.

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

Sub UserProc;
Var
    regrep: IPrxReport;
    sheet: IPrxSheet;
    table: IPrxTable;
    objects: ITabObjects;
    map: IMap;
    legend: IMapLegend;
    pad: IGxRectF;
Begin
    // Get regular report
    regrep := UiReport1.Report;
    // Get map from regular report
    sheet := regrep.Activesheet;
    table := sheet As IPrxTable;
    objects := table.TabSheet.Objects;
    map := objects.Item(0).Extension As IMap;
    // Get map legend
    legend := map.View.Legend;
    // Disable automatic legend paddings on the map
    legend.AutoPadding := False;
    // Create and set legend paddings
    pad := New GxRectF.Create(1111);
    legend.Padding := pad;
    // Set position of elements by rows
    legend.ElementPlacement := MapLegendElementPlacement.CustomRows;
    // Set quality of legend rows
    legend.RowCount := 4;
    // Disable automatic paddings between element icons and labels
    legend.SymbolSpaceAuto := False;
    // Set padding between element icons and labels
    legend.SymbolSpace := 2;
    // Disable automatic padding between columns
    legend.ColumnSpaceAuto := False;
    // Set padding between columns
    legend.ColumnSpace := 5;
    // Disable automatic padding between rows
    legend.RowSpaceAuto := False;
    // Set padding between rows
    legend.RowSpace := 2;
    // Set alignment of elements by the right edge
    legend.ElementsHorizontalAlign := MapHorizontalAlignment.Right;
    // Set icon size
    legend.MarkerSize := 10;
    // Refresh map
    map.Refresh;
End Sub UserProc;

After executing the example icon size and paddings between legend elements are increased, elements are aligned by the right edge.

See also:

IMapLegend