TheIndependentAquarius
16th May 2011, 14:38
The way to generate a path between two coordinates is shown here: http://apidocs.meego.com/1.2-preview/qtmobility/qgeoroutingmanager.html
Now how to get the list of all the coordinates lying on the generated path (through QGeoRoutingManager) on the Qt widget containing the map?
Added after 1 10 minutes:
SOLVED:
This class calculates the routes:
1. http://apidocs.meego.com/1.2-preview/qtmobility/qgeoroutingmanager.html
The concerned function in the above class returns the: http://apidocs.meego.com/git-tip/qtmobility.orig/qgeoroutereply.html
We need to find all the coordinates on the route, so that the route can be displayed:
1. "QGeoRouteReply" has a member routes (): http://apidocs.meego.com/1.2-preview/qtmobility/qgeoroutereply.html#routes which returns "QList<QGeoRoute>"
"QGeoRoute" class has a function "path" which returns all the coordinates of the path: http://apidocs.meego.com/1.2-preview/qtmobility/qgeoroute.html#path
We can use those coordinates through "QPainter" class to draw lines on the map.
Now how to get the list of all the coordinates lying on the generated path (through QGeoRoutingManager) on the Qt widget containing the map?
Added after 1 10 minutes:
SOLVED:
This class calculates the routes:
1. http://apidocs.meego.com/1.2-preview/qtmobility/qgeoroutingmanager.html
The concerned function in the above class returns the: http://apidocs.meego.com/git-tip/qtmobility.orig/qgeoroutereply.html
We need to find all the coordinates on the route, so that the route can be displayed:
1. "QGeoRouteReply" has a member routes (): http://apidocs.meego.com/1.2-preview/qtmobility/qgeoroutereply.html#routes which returns "QList<QGeoRoute>"
"QGeoRoute" class has a function "path" which returns all the coordinates of the path: http://apidocs.meego.com/1.2-preview/qtmobility/qgeoroute.html#path
We can use those coordinates through "QPainter" class to draw lines on the map.