diff options
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 6ad52c419..0897dcff8 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -4,6 +4,7 @@ #include <QDebug> #include <QNetworkAccessManager> #include <QAuthenticator> +#include <QDesktopServices> #include "qt-models/divelistmodel.h" #include "divelist.h" @@ -467,3 +468,12 @@ void QMLManager::setStartPageText(QString text) m_startPageText = text; emit startPageTextChanged(); } + +void QMLManager::showMap(QString location) +{ + if (!location.isEmpty()) { + QString link = QString("https://maps.googleapis.com/maps/api/staticmap?center=%1&zoom=15&size=600x400&maptype=satellite&markers=color:red|%2") + .arg(location).arg(location); + QDesktopServices::openUrl(link); + } +} |