summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-03-21 17:52:29 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-03-24 09:35:00 -0700
commitd6003209d6abf715a00802debcd25b145154c8b1 (patch)
treef3e5c891df0142a04a1d56e551d950fa245d15dc /mobile-widgets
parent6e38619970fa09fa93f086d819dd44353e70ab45 (diff)
downloadsubsurface-d6003209d6abf715a00802debcd25b145154c8b1.tar.gz
Subsurface-mobile: do send decimal GPS to Google
Sending nicely readable formatted coordinates to Google Maps does not result in a correctly positioned map. Google likes unreadable decimal format. Little hacky solution. Added a gps_decimal attribute, populate that with the standard function for format a coordinate to string, but reset the preferences value temporarly so that it always converts it to decimal style. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qml/DiveDetails.qml2
-rw-r--r--mobile-widgets/qml/DiveDetailsView.qml4
2 files changed, 3 insertions, 3 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml
index 0a7680ef8..076a63576 100644
--- a/mobile-widgets/qml/DiveDetails.qml
+++ b/mobile-widgets/qml/DiveDetails.qml
@@ -89,7 +89,7 @@ Kirigami.Page {
text: qsTr("Show on map")
iconName: "gps"
onTriggered: {
- showMap(diveDetailsListView.currentItem.modelData.dive.gps)
+ showMap(diveDetailsListView.currentItem.modelData.dive.gps_decimal)
}
}
diff --git a/mobile-widgets/qml/DiveDetailsView.qml b/mobile-widgets/qml/DiveDetailsView.qml
index c43b8a313..79602e645 100644
--- a/mobile-widgets/qml/DiveDetailsView.qml
+++ b/mobile-widgets/qml/DiveDetailsView.qml
@@ -53,8 +53,8 @@ Item {
MouseArea {
anchors.fill: parent
onClicked: {
- if (dive.gps !== "")
- showMap(dive.gps)
+ if (dive.gps_decimal !== "")
+ showMap(dive.gps_decimal)
}
}
}