"setMinWidthLayer"

Sets the minimum width for a layer.

Synopsis

void setMinWidthLayer(string strLayer,double dWidth);

Parameters

Parameter Description
strLayer The layer whose width will be set.
dWidth The minimum width of the layer. The width is given in degrees or meters depending on which map you use.

Description

Defines up to which width a layer 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.

You can get the coordinates with "getXRight" and "getXLeft". If the x coordinate of the left side is 10, and the coordinate on the right side is 100, a width of 90 is displayed. If you want to display a layer only after zooming in, you set a smaller value, for example 50. Therefore, the layer is only visible if you zoom in till the difference of the coordinates is 20 or smaller.

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

Example

The code below will set the minimum width of a layer to 5000.

main()
{
  GisViewer_ewo1.setMinWidthLayer("COUNTRY",5000);
}

Assignment

GIS Viewer