PDA

View Full Version : How to fetch the list of generated path coordinates on a Google Map painted in the Qt



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.

TheIndependentAquarius
17th May 2011, 05:11
I wonder if there is a way to mark the threads SOLVED here :mad:

high_flyer
17th May 2011, 10:02
You can when you enter edit mode.
But your subject line is too long, if you make room for "[SOLVED]" you will be able to change the title.:)

TheIndependentAquarius
17th May 2011, 10:34
Thanks, Well, at LinuxQuestions.org we have an option in the thread tools to click and then the thread gets marked solved automatically.

If I shorten the title, this thread may not come up in a Google search.