mapwidgethelper: support tracking of all selected dive sites

MapWidgetHelper::centerOnDiveSite() now checks if more than
one dive sites are selected and finds the most top-left and
bottom-right ones in the coordinate system to form
a rectangle.

It also supports the special cases where a selected dive site
does not have coordinates or the case where only a single dive site
with GPS coordinates are selected.

TODO: implement mapwidget.qml::centerOnRectangle()
This QML function will receive a QGeoCoordinate based rectangle which
has to be centered in the viewport with animation.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-08-07 02:04:23 +03:00 committed by Dirk Hohndel
parent 6fb841887d
commit d421660f91
2 changed files with 63 additions and 7 deletions

View file

@ -171,6 +171,10 @@ Item {
mapAnimationZoomOut.stop()
}
function centerOnRectangle(topLeft, bottomRight, center) {
// TODO
}
function deselectMapLocation() {
animateMapZoomOut()
}