Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Location: RouteLeg contains no steps member
Forum Updated to NodeBB v4.3 + New Features

Location: RouteLeg contains no steps member

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 166 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DuBuD Offline
    DuBuD Offline
    DuBu
    wrote on last edited by
    #1

    Hi all,
    the API documentation of OSRM mentions an array of RouteStep objects which should be included in a RouteLeg object of a response when the query contains the steps=true option. Regarding the Qt source code that option is explicitly set in any route request of osrm v5. A response of a request submitted via curl on the command line contains those RouteStep objects. Neither RouteLeg nor the QGeoRouteLeg contain that array of RouteStep objects.
    Interestingly, the RouteManeuver contains a "step_index" in the extraAttributes object, which I recon is the index in the (missing) array of RouteStep objects.
    Is that array found somewhere else or is there any option/parameter I need to set to get this array?

    Cheers!

    1 Reply Last reply
    0
    • DuBuD Offline
      DuBuD Offline
      DuBu
      wrote on last edited by
      #2

      After looking more deeper into the Qt source code I figured out that Qt uses the term "segment" instead of "step" and also found the method

      QGeoRouteParserOsrmV5Private::parseStep(const QJsonObject &step, int legIndex, int stepIndex)
      

      That method parses the RouteStep objects I was looking for. But unfortunately it does it incompletely. Although it checks whether the "intersections" property is an array but it doesn't inserts these into the returned RouteSegment object. That property of the RouteStep I was most interested in.
      It seems I've got to write my own QGeoRouteParser. :-(

      Cheers!

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved