"addVarValueColorMapping"
With the color mapping function, you can set different colors for a shape for each range of values of an assigned variable.
Synopsis
void addVarValueColorMapping(string strLayer, string
strVariable, string strVarValue, double dRangeMin, double
dRangeMax, string strColor);
Parameters
Parameter | Description |
---|---|
strLayer | The layer for that a color mapping should be set. |
strVariable | The shape field of the layer. |
strVarValue | The value assigned to shapes. |
dRangeMin | Minimum range that should be displayed. |
dRangeMax | Maximum range that should be displayed. |
strColor | The color that should be set. |
Description
With the color mapping function, you can set different colors for a shape for each range of values of an assigned variable.
Assign the variable using the function assignVariableToShape().
Example
Sets a color mapping table. STATUS is a numerical variable. The color mapping means that the color ksgis_Status0 is assigned when the numerical value is between -0.5 and +0.5.
main()
{
smallmap.addVarValueColorMapping("DEMOLAYER", "STATUS", "", -0.5, 0.5, "ksgis_Status0");
smallmap.addVarValueColorMapping("DEMOLAYER", "STATUS", "", 0.5, 1.5, "ksgis_Status1");
smallmap.addVarValueColorMapping("DEMOLAYER", "STATUS", "", 1.5, 2.5, "ksgis_Status2");
smallmap.addVarValueColorMapping("DEMOLAYER", "STATUS", "", 2.5, 3.5, "ksgis_Status3");
}
Assignment
GIS Viewer