diff options
author | Albin Olsson <albin.olsson@cybercom.com> | 2013-11-26 13:39:42 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-27 13:53:53 +0100 |
commit | 0d134c50669ae963fc87547e5d716b9bcf7a3752 (patch) | |
tree | fc2daed751edb3d11c980f27f4574ecac3d51ab4 /src/plugins/geoservices/osm | |
parent | 212060caf5a2be4e7e746a3706606a0073abe291 (diff) | |
download | qtlocation-0d134c50669ae963fc87547e5d716b9bcf7a3752.tar.gz |
Fix instructions for open street map routes.
In order to get instructions for an open street map route, 'instructions'
needs to be set to 'true' in the http request to
http://router.project-osrm.org/viaroute
Change-Id: Ia25ca806c8cd40f56bfa2a7aed0a2a519d63e074
Reviewed-by: Anders Gunnarsson <anders.gunnarsson@appello.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/plugins/geoservices/osm')
-rw-r--r-- | src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp index a07eb62e..6f7bbb30 100644 --- a/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qgeoroutingmanagerengineosm.cpp @@ -72,6 +72,8 @@ QGeoRouteReply* QGeoRoutingManagerEngineOsm::calculateRoute(const QGeoRouteReque QUrl url(QLatin1String("http://router.project-osrm.org/viaroute")); QUrlQuery query; + query.addQueryItem(QStringLiteral("instructions"), QStringLiteral("true")); + foreach (const QGeoCoordinate &c, request.waypoints()) { query.addQueryItem(QLatin1String("loc"), QString::number(c.latitude()) + QLatin1Char(',') + QString::number(c.longitude())); |