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>
This commit is contained in:
Lubomir I. Ivanov 2017-07-17 23:13:31 +03:00 committed by Dirk Hohndel
parent de90480b46
commit 476670cb8d
2 changed files with 4 additions and 6 deletions

View file

@ -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();
}