Exact(Index: Integer): Double;
Index. Scale tick mark index.
The Exact property determines the number for the values equal to scale tick mark value.
Executing the example requires a form with the following components: the Button component named Button1, the MapBox component named MapBox1, and the UiMap component named UiMap1. UiMap1 is a data source for MapBox1. The VisualDataAdapter class, that creates a dynamic data source, must also be implemented. The class example is contained in the IMapVisual.DataAdapter property description.
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;
BarVisual: IMapBarVisual;
Height: IMapVisualNumericProperty;
Scale: IMapNumericScale;
Begin
Map := UiMap1.Map;
Layer := Map.Layers.FindByName("Regions");
BarVisual := Layer.Visuals.AddBarVisual;
BarVisual.DataAdapter := New VisualDataAdapter.Create As IMapDynamicDataAdapter;
Height := BarVisual.Height;
Height.DataAdapter := BarVisual.DataAdapter;
Height.Dependent := True;
Scale := New DxMapNumericScale.Create As IMapNumericScale;
Scale.Count := 1;
Scale.Value(0) := 50;
Scale.NoData := 0;
Scale.Greater(0) := 2;
Scale.Exact(0) := 4;
Scale.Less(0) := 6;
Height.Scale := Scale;
End Sub Button1OnClick;
After executing the example the bar indicator, which height is determined using the scale, is added to the Regions layer.
See also: