Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. UnknownError returned from RouteModel

UnknownError returned from RouteModel

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 2.0k Views 2 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.
  • A Offline
    A Offline
    alegria
    wrote on last edited by
    #1

    Hey everyone,

    I am developing a project for my term project and in one of the modules it gets two coordinates from me, finds the shortest path and shows the route. But for about a week now, the plugin doesn't seem to draw any route. I tried running a routing query on OSM website which worked just fine. Thing is when I use GeocodeModel it works just fine but when it comes to RouteModel, it does not draw the path between coordinates also sets the "status" in routeModel to 3 -which is RouteModel.Error-, "error" to 5 -which is RouteModel.UnknownError- and "errorString" to "Found route between points".
    I tried tracing packets using WireShark -as Mr.Aaron McCarthy from QtLocation asked- and there is no json file directed to my IP from server.

    Any ideas on how can I overcome this issue ?
    Many thanks in advance.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Without any code it's pretty difficult, can you provide a small compilable example that shows that behavior ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alegria
        wrote on last edited by alegria
        #3

        Thanks. I didn't add the code because it's the code Laszlo Agocs implemented in this video . I assumed the error QT-related. Anyway here's the code :

        Item {
            property variant fromCoordinate : QtPositioning.coordinate(-27.579336,153.100333);
            property variant toCoordinate : QtPositioning.coordinate(-37.759136, 145.156359);
            PositionSource{
                active:true
                onPositionChanged: { console.log(position.coordinate);}
            }
            Map{
                id:map
                plugin: Plugin{
                    name: "osm"
                    }
               center {
                    latitude: -27.5796
                    longitude: 153.1003
                }
                zoomLevel: 15
                gesture.enabled: true
                anchors.fill:parent
                MapQuickItem{
                    id:marker
                    opacity: 0.6
                    coordinate:QtPositioning.coordinate(-27.579622,153.10032);
                    sourceItem: Image {
                        id:image
                        source: "qrc:/resources/arrow.png"
                    }
                    anchorPoint.x: 0
                    anchorPoint.y: image.height/2
                }
                MapItemView{
                    model: routeModel
                    delegate: Component {
                        MapRoute{
                            route:routeData
                            line.color:"blue"
                            line.width: 4
                        }
                    }
                }
            }    
            RouteModel
           {
               id:routeModel
               plugin: map.plugin
               query:RouteQuery{
                   id:routeQuery }
               autoUpdate: true
               Component.onCompleted: {
                   routeQuery.addWaypoint(fromCoordinate);
                   routeQuery.addWaypoint(toCoordinate);
                   update();           
               }      
           }
        }
        

        Sorry it's a bit long. Thanks for your interest.

        Edit: The lines I logged error values I mentioned above aren't included for the sake of clarity.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alegria
          wrote on last edited by
          #4
          • Update -
            So, an interesting thing happened. I was tracing the packets in and out on my network, I filtered the ones whose ip:"141.3.85.1" -which i think is the routing server- the packets sent to me from this source includes a application.json file. Inside the file is the route between my coordinates.
            tags included in the file is here
          1 Reply Last reply
          0
          • A Offline
            A Offline
            alegria
            wrote on last edited by alegria
            #5

            Up!
            So anyone catches sight of the topic.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I've tested your code but I can't reproduce your error, so it might indeed but something in your current network setup.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • A Offline
                A Offline
                Alexander_Lanin
                wrote on last edited by
                #7

                Hi, any progress in the last months? I have the same problem with example code from http://doc.qt.io/qt-5/qgeoroutingmanager.html#details

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Alexander_Lanin
                  wrote on last edited by
                  #8

                  ah it's fixed in 5.6.0 RC: https://bugreports.qt.io/browse/QTBUG-50240

                  1 Reply Last reply
                  1

                  • Login

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