diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2018-05-18 15:17:24 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <brunoabinader@gmail.com> | 2018-05-21 13:29:24 +0000 |
commit | 55bbdc5ee5d7891676c1474ce51cbb6971efbdfb (patch) | |
tree | f1248dae75d1ab1fba00050aa9ad768070717dfc | |
parent | 28994ca77e513a95efd47742742ef6379570e5f9 (diff) | |
download | qtlocation-55bbdc5ee5d7891676c1474ce51cbb6971efbdfb.tar.gz |
Add missing Mapbox Directions API query parameters
Task-number: QTBUG-68358
Change-Id: I27422f5deb355dd4e4089f35c59a9f69d579cae8
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp b/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp index 73bca2f7..e8db635f 100644 --- a/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp +++ b/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp @@ -75,8 +75,14 @@ void QGeoRouteParserOsrmV5ExtensionMapbox::updateQuery(QUrlQuery &query) const if (!m_accessToken.isEmpty()) query.addQueryItem(QLatin1String("access_token"), m_accessToken); + query.addQueryItem(QLatin1String("annotations"), QLatin1String("duration,distance,speed,congestion")); + query.addQueryItem(QLatin1String("voice_instructions"), QLatin1String("true")); query.addQueryItem(QLatin1String("banner_instructions"), QLatin1String("true")); + query.addQueryItem(QLatin1String("roundabout_exits"), QLatin1String("true")); + + QLocale::MeasurementSystem unit = QLocale::system().measurementSystem(); + query.addQueryItem(QLatin1String("voice_units"), unit == QLocale::MetricSystem ? QLatin1String("metric") : QLatin1String("imperial")); } static QVariantMap parseMapboxVoiceInstruction(const QJsonObject &voiceInstruction) |