addLine()

This function adds a new empty line to the Maps EWO.

Synopsis

int addLine(string lineColor = "black", int lineWidth = 1, int layerId = 1)

Parameter

Parameter Description
lineColor Specifies the color of the new line, which can be any static WinCC OA color.
lineWidth Specifies the thickness of the new line. Valid values are all numbers ≥ 0.
layerId Layer number. Default: 1

Description

This function is used to insert lines on the Maps EWO. The function returns the unique line number inside the defined layer which can be used for further operations, such as adding points (defined by coordinates) to the line.

The function only creates an empty line. To make it visible at least two points must be added by using the function addPointToLine(), e.g.

int iLine = Maps_ewo1.addLine("red", 2);
Maps_ewo1.addPointToLine(iLine, 47.830147, 16.532771);
Maps_ewo1.addPointToLine(iLine, 90, 0);

Assignment

Maps Widget

See also

addPointToLine(), centerOnLine(), getLineColor(), getLinePoints(), getLines(), getLineType(), getLineWidth(), lineExists(), removeLine(), setLineColor(), setLineType(), setLineWidth()