centerOnPolygon()

Changes the map view to the center of the specified polygon.

Synopsis

bool centerOnPolygon(int polygonId, int layerId = 1, float alt = 0.0, bool animated = true)

Parameter

Parameter Description
polygonId Polygon number
layerId Layer number of the polygon default: 1
alt Altitude
animated Defines if the change of view should be animated with a scrolling effect

Description

This function sets the current visible map area to the center of a specified polygon of the Maps EWO. When no valid altitude is given it is chosen automatically to show the whole polygon. It returns false in case of an error, otherwise true.

Assignment

Maps Widget

See also

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