Registered Member
|
Hello dear Marble Team,
I found out that I could request a route via
But is there a way to retrieve the route's segments? So basically all I want is a list of all the coordinates between which marble draws straight lines. But without visualisation. On a different matter: - Are routing calculations performed locally, but with map data that is downloaded from the web? |
KDE Developer
|
Hi,
after calling retrieveRoute you have to wait for the route to be calculated, which is indicated by the stateChanged signal (and also the RoutingManager::state() method). Afterwards RoutingManager::routingModel() has the data you want. It is a QAbstractListModel convenient for Qt's item view classes, but has a method route() method also to retrieve the data in a format that is easier to work with elsewhere. In code: [code] [...] rManager->retrieveRoute(); // method above is async; somehow wait for rManager to emit stateChanged() here with value Retrieved Route route = rManager->routingModel()->route(); The Route class has the info you are looking for, e.g. path() for all points, at() for specific segments, ... Marble supports both online (routes fetched from web) and offline ones (routes fetched locally). Offline currently means that the routes are calculated by another program running on the same system. The best example is the monav backend, which also has a nice frontend for data download in the Marble application. |
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]