IMapIconScale.NoData

Syntax

NoData(Index: Integer): IGxImage;

Parameters

Index. Scale tick mark index.

Description

The NoData property determines the icon for the missing values.

Example

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. A map should be connected to the UiMap1 component. The VisualDataAdapter class that creates a dynamic data source should also be implemented. The class example is contained in the IMapVisual.DataAdapter property description. The file system should contain the files: C:\Greater.gif, C:\Exact.gif and C:\Less.gif with images.

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

Add links to the Drawing, 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.AddImageVisual;
    ImageVisual.DataAdapter := New VisualDataAdapter.Create As IMapDynamicDataAdapter;
    ImageProp := ImageVisual.Image;
    ImageProp.DataAdapter := ImageVisual.DataAdapter;
    ImageVisual.Height.Value := 2;
    ImageVisual.Width.Value := 2;
    ImageProp.Dependent := True;
    Scale := ImageProp.Scale;
    Scale.Count := 1;
    Scale.Value(0) := 50;
    Scale.Greater(0) := GxImage.FromFile("C:\Greater.gif");
    Scale.Less(0) := GxImage.FromFile("C:\Less.gif");
    Scale.NoData := GxImage.FromFile("C:\Exact.gif");
End Sub Button1OnClick;

After executing the example the icon indicator is added to the Regions layer. The indicator icon is determined by the scale:

The values greater than fifty are indicated with the icon; the values less than fifty - with the icon; the missing values - with the icon.

See also:

IMapIconScale