Show Nearby Routes
Closed, ResolvedPublic

Description

  • Study the OSM wiki a bit to learn about route relations, e.g. Relation:route and Hiking. Looking at some data in e.g. josm could be helpful as well
  • Marble uses GeoDataRelation instances to represent route relations. A GeoDataRelation contains pointers to GeoDataPlacemark instances. They are extracted since some days only, so you have to re-create vector tiles locally to get proper data. Cities (e.g. Karlsruhe, Germany) or forests (e.g. Black Forest, Germany) are full of such routes and therefore good for testing. Other places should work well, too, query overpass in doubt.
  • There is some stub code already that shows how to get all relations that belong to a place which the user selects. The goal of this task is to collect all those relations and present them to the user in marble-maps using a QML View (like a ListView)
  • Extend the stub code to gather all matching GeoDataRelation in a QVector. Add a method setRelations to declarative/Placemark.cpp. This method should feed the data to a new class RouteRelationModel which has to inherit from QAbstractListModel. You might want to study Models and Views in Qt Quick for an introduction to models and views. Make the route relation model available as a Q_PROPERTY' in Placemark.h`
  • Extend PlacemarkDialog.qml to hold another ListView which presents the route relations from the model to the user. Show the name of the route. Icons and further interaction like highlighting the route in the map will come later.
nienhueser moved this task from Backlog to Marble Maps 1.x on the Marble board.
Sergobot claimed this task.Jan 7 2017, 3:17 PM
nienhueser closed this task as "Resolved".Jan 21 2017, 3:17 PM