"maxWidthForText"

Sets the maximum width of the shown area for which the text will be displayed.

Synopsis

void maxWidthForText(float mWidth);

Parameters

Parameter Description
mwidth The maximum width

Description

Sets up to which width the text will be displayed. The value of the width is the difference between the x-coordinates of the right and left side of the opened GIS-viewer screen.

If you set 20 for the width, the text will only be displayed if you zoom in, till the difference is 20 or smaller. That means that for instance, if the left edge of the display has the coordinate 20 and the right edge the coordinate 40, the text will be shown.

If you haven't zoomed in close enough, the text isn't displayed.

Example

Sets the maximum text width for the layer COUNTRY and sets the text of the layer "AUSTRIA" (column STATE) visible.

main()
{
  GisViewer_ewo1.maxWidthForText = 4;
  GisViewer_ewo1.setTextVisible( "AUSTRIA", 1 );
  GisViewer_ewo1.selectShapeVarAsShapeName( "AUSTRIA", "STATE");
} 
Figure 1. Difference of x-coordinates = ~8.9

There is no text displayed, since 4 is set as the maximum difference of the coordinates and in this case, the difference is 8.9..

Figure 2. Difference of x-coordinates = ~3.1

The text is displayed, because the value is less than 4.

Assignment

GIS Viewer