addPolygon()

The function adds an empty polygon to the Maps EWO.

Synopsis

int addPolygon(string fillColor = "red", string lineColor = "black", int lineWidth = 1, int layerId = 1)

Parameter

Parameter Description
fillColor Specifies the fill color of the polygon, which can be any static WinCC OA color.
lineColor Specifies the border color of the polygon.
lineWidth Specifies the width of the outline of the polygon.
layerId Layer number of polygon. Default: 1

Description

This function is used to create a polygon for drawing on the map, whose size and shape are defined by corner coordinates.

The function only creates an empty polygon. Its corner coordinates must be set via setPolygonOuterBoundaries() afterwards in order to make it visible, e.g.

int iPolygon = Maps_ewo1.addPolygon("green", "blue", 2);
Maps_ewo1.setPolygonOuterBoundaries(iPolygon,makeDynFloat(47.830147, 48.205793, 47.067722),
makeDynFloat(16.532771, 16.370789, 15.438699));

Assignment

Maps Widget

See also

appendPolygonInnerBoundaries(), centerOnPolygon(), getPolygonColor(), getPolygonFillPattern(), getPolygonInnerBoundaries(), getPolygonLineType(), getPolygonLineWidth(), getPolygonOuterBoundaries(), getPolygons(), polygonExists(), removePolygon(), setPolygonColor(), setPolygonFillPattern(), setPolygonLineType(), setPolygonLineWidth(), setPolygonOuterBoundaries()