Skip to content

Commit 79ce213

Browse files
author
Vladyslav Stelmakhovskyi
committed
Fix route details
1 parent a9df8ee commit 79ce213

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

qgeoroutereplygooglemaps.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,7 @@ void QGeoRouteReplyGooglemaps::networkReplyFinished()
155155

156156
QJsonObject o = jsonroutes.at(i).toObject();
157157

158-
QByteArray routeGeometry = o.value(QStringLiteral("overview_polyline")).
159-
toObject().value(QStringLiteral("points")).toString().toLatin1();
160-
QList<QGeoCoordinate> path = parsePolyline(routeGeometry);
161-
158+
QList<QGeoCoordinate> path;
162159

163160
QJsonObject bo = o.value(QStringLiteral("bounds")).toObject();
164161
QJsonObject ne_loc_o = bo.value(QStringLiteral("northeast")).toObject();
@@ -191,6 +188,8 @@ void QGeoRouteReplyGooglemaps::networkReplyFinished()
191188
QList<QGeoCoordinate> steppath = parsePolyline(stepGeometry);
192189
QString directionCode = stepo.value("maneuver").toString();
193190

191+
path += steppath;
192+
194193
maneuver.setDirection(gmapsInstructionDirection(directionCode));
195194
maneuver.setDistanceToNextInstruction(distance);
196195
maneuver.setInstructionText(instructionText);

0 commit comments

Comments
 (0)