centerOnLine()

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

Synopsis

bool centerOnLine(int lineId, int layerId = 1, float alt = 0.0, bool animated = true)

Parameter

Parameter Description
lineId Line number
layerId Layer number of the line 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 line of the Maps EWO. When no valid altitude is given it is chosen automatically to show the whole line. It returns false in case of an error, otherwise true.

This function sets the current visible map area to the center of the smallest rectangle, which contains the whole line. This means that the line can be outside of the visible area when the function is used with a too low altitude.

Assignment

Maps Widget

See also

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