"zoomByVariableValue"

Zooms all shapes that are assigned to a certain value of a variable.

Synopsis

void zoomByVariableValue(string strVariable, string strValue);

Parameters

Parameters Description
strVariable The variable used to zoom.
strValue The value used to zoom.

Description

A GIS Viewer will typically contain several layers and each of the layers contains shapes (polygons, lines, rectangles). To zoom a set of shapes, assign a variable to the shapes and use a zoom function to show all shapes with a specific value.

The variables of the function GisViewer_ewo1.AssignVariableToShape( <layer>, <field>, <field value>, <variable>, <variable value>

are

  • <Layer> Name of a layer

  • <Field> Field used to identify a shape. Should be a unique field value.

  • <Field value> Value for the field that is used to identify one of the shapes

  • <Variable> The name of a variable to be assigned to the shape.

  • <Value> The value for the variable. You can use the variable later, for example, to change the color of one or more shapes that contain this variable.

Example

The code below will show all shapes that contain the variable "Cit" with the value 1. First the variable "Cit" and the value 1 will be assigned to the shape "Luxemburg" and then the shape will be zoomed.

main()
{
  GisViewer_ewo1.assignVariableToShape( "COUNTRY", "CAPITAL", "Luxembourg", "Cit", 1); 
  GisViewer_ewo1.zoomByVariableValue("Cit",1); 
}

Assignment

GIS Viewer