aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mobile-widgets/qml/DiveDetails.qml3
-rw-r--r--mobile-widgets/qml/DiveDetailsView.qml8
-rw-r--r--mobile-widgets/qml/GpsList.qml3
-rw-r--r--mobile-widgets/qml/main.qml10
4 files changed, 12 insertions, 12 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index 5ab1f627d..82150cc5b 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -170,7 +170,8 @@ Kirigami.Page {
name: "gps"
}
onTriggered: {
- showMap(currentItem.modelData.dive.gps_decimal)
+ showMap()
+ mapPage.centerOnDiveSiteUUID(currentItem.modelData.dive.dive_site_uuid)
}
}
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml
index 3a3adf62a..31524df38 100644
--- a/mobile-widgets/qml/DiveDetailsView.qml
+++ b/mobile-widgets/qml/DiveDetailsView.qml
@@ -51,8 +51,8 @@ Item {
anchors.fill: parent
enabled: dive.gps_decimal !== ""
onClicked: {
- if (dive.gps_decimal !== "")
- showMap(dive.gps_decimal)
+ showMap()
+ mapPage.centerOnDiveSiteUUID(dive.dive_site_uuid)
}
}
}
@@ -62,8 +62,8 @@ Item {
enabled: dive.gps !== ""
text: qsTr("Map it")
onClicked: {
- if (dive.gps_decimal !== "")
- showMap(dive.gps_decimal)
+ showMap()
+ mapPage.centerOnDiveSiteUUID(dive.dive_site_uuid)
}
}
Row {
diff --git a/mobile-widgets/qml/GpsList.qml b/mobile-widgets/qml/GpsList.qml
index 51025299f..ea5098943 100644
--- a/mobile-widgets/qml/GpsList.qml
+++ b/mobile-widgets/qml/GpsList.qml
@@ -86,7 +86,8 @@ Kirigami.ScrollablePage {
name: "gps"
}
onTriggered: {
- showMap(latitude + " " + longitude)
+ showMap()
+ mapPage.centerOnLocation(latitude, longitude)
}
}
diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml
index 31c4d14b7..746c419f1 100644
--- a/mobile-widgets/qml/main.qml
+++ b/mobile-widgets/qml/main.qml
@@ -67,12 +67,10 @@ Kirigami.ApplicationWindow {
diveList.scrollToTop()
}
- function showMap(location) {
- var urlPrefix = "https://www.google.com/maps/place/"
- var locationPair = location + "/@" + location
- var urlSuffix = ",5000m/data=!3m1!1e3!4m2!3m1!1s0x0:0x0"
- Qt.openUrlExternally(urlPrefix + locationPair + urlSuffix)
-
+ function showMap() {
+ globalDrawer.close()
+ returnTopPage()
+ stackView.push(mapPage)
}
function startAddDive() {