summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/MapWidget.qml
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-07-17 23:13:31 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-07-28 07:31:11 -0700
commit476670cb8da0b0e4823e95a3eecdae40e7402811 (patch)
treef49eccaf4d13ee204c5a5bb0bb0b4a11eb2b3be6 /mobile-widgets/qml/MapWidget.qml
parentde90480b462891d1b03f8c40c9a42a7bf29d6d35 (diff)
downloadsubsurface-476670cb8da0b0e4823e95a3eecdae40e7402811.tar.gz
mapwidgethelper: pass a QGeoCoordinate to the QML map
Rename the QML function "centerOnCoordinates" to "centerOnCoordinate" and pass a QGeoCoordinate to it in ::centerOnDiveSite(). This will prevent the creation of a QGeoCoordinate object on the QML side and instead it will be created in C++. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'mobile-widgets/qml/MapWidget.qml')
-rw-r--r--mobile-widgets/qml/MapWidget.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml
index 5fe941792..ce057d63e 100644
--- a/mobile-widgets/qml/MapWidget.qml
+++ b/mobile-widgets/qml/MapWidget.qml
@@ -60,8 +60,8 @@ Item {
}
}
- function centerOnCoordinates(latitude, longitude) {
- map.newCenter = QtPositioning.coordinate(latitude, longitude);
+ function centerOnCoordinate(coordinate) {
+ map.newCenter = coordinate;
map.zoomLevel = 2;
mapAnimation.restart();
}