IMapLegend.ResetFormats

Syntax

ResetFormats;

Description

The ResetFormats method resets settings for legend elements.

Comments

To set up legend elements, use the properties: IMapLegendLabelFormat.Between, IMapLegendLabelFormat.Equal, IMapLegendLabelFormat.Greater, IMapLegendLabelFormat.Less, IMapLegendLabelFormat.NoData.

Example

Executing the example requires a form containing the Button component with the Button1 identifier, the MapBox component with the MapBox1 identifier and the UiMap component with the UiMap1 identifier. Set the UiMap1 data source for the MapBox1 component.

The express report with a map containing the layer with the EOmap identifier is used as a data source.

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

Add links to the Express, ExtCtrls, Map system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Map: IMap;
    Layer: IMapLayer;
    Legend: IMapLegend;
Begin
    Map := UiMap1.Map;
    Legend := New DxMapLegend.Create As IMapLegend;
    Layer := Map.Layers.FindByName("EOmap");
    Legend.Visual := Layer.Visuals.Item(0As IMapVisual;
    Legend.ResetFormats;
End Sub Button1OnClick;

After executing the example standard settings of labels format are returned for the map legend.

See also:

IMapLegend