From d421660f91d56ac434860a1deff17eeeacbc7e26 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 7 Aug 2017 02:04:23 +0300 Subject: 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 --- mobile-widgets/qml/MapWidget.qml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index f3853de74..42bc546ce 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -171,6 +171,10 @@ Item { mapAnimationZoomOut.stop() } + function centerOnRectangle(topLeft, bottomRight, center) { + // TODO + } + function deselectMapLocation() { animateMapZoomOut() } -- cgit v1.2.3-70-g09d2