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. How to routing between 2 points, when i have only the addresse and Problem with drawing the way

How to routing between 2 points, when i have only the addresse and Problem with drawing the way

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 408 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.
  • D Offline
    D Offline
    DragonCoder
    wrote on last edited by DragonCoder
    #1

    Hi, I have problem with routing between 2 points. So, I have:

    
    
    ```RouteModel {
                        id: routeBetweenPoints
                        plugin: Plugin { name: "osm" }
                        query: RouteQuery {id: routeQuery }
                        Component.onCompleted: {
                        routeQuery.addWaypoint(QtPositioning.coordinate(51.318784,12.2773504 ));
                        routeQuery.addWaypoint(QtPositioning.coordinate(51.3117764,12.280909000000065 ));
                        update();
                        }
                }
    
    
    And I want route between 2 points, only by using the Addresse. 
    
    
    Button {
                        id: sendDataToItem
                        width: 100
                        height: 40
                        x: app_window.width / 2.7
                        text: "Send"
    
                    onClicked: {
                        fromAddress.country = txtFromAddressCountry.text;
                        fromAddress.city = txtFromAddressCity.text;
                        fromAddress.street = txtFromAddressStreet.text;
                        fromAddress.postalCode = txtFromAddressPostalCode.text;
    
                        toAddress.country = txtToAddressCountry.text;
                        toAddress.city = txtToAddressCity.text;
                        toAddress.street = txtToAddressStreet.text;
                        toAddress.postalCode = txtToAddressPostalCode.text;
    
                        //console.log(fromAddress);
                    }
                } //sendDataToItem
    

    But it doesn't work, beacouse i need to use the coordinates. And I don't know, how I can translate the adrdresse to coordinates. And of the another side, when I use all whta is inside onClicked, then i don't see th way which i draw

    
    
    RouteModel {
                        id: routeBetweenPoints
                        plugin: Plugin { name: "osm" }
                        query: RouteQuery {id: routeQuery }
                        Component.onCompleted: {
                        routeQuery.addWaypoint(QtPositioning.coordinate(51.318784,12.2773504 ));
                        routeQuery.addWaypoint(QtPositioning.coordinate(51.3117764,12.280909000000065 ));
                        update();
                        }
                }
    
    Know someone the resoult for this problem?
    raven-worxR 1 Reply Last reply
    0
    • D DragonCoder

      Hi, I have problem with routing between 2 points. So, I have:

      
      
      ```RouteModel {
                          id: routeBetweenPoints
                          plugin: Plugin { name: "osm" }
                          query: RouteQuery {id: routeQuery }
                          Component.onCompleted: {
                          routeQuery.addWaypoint(QtPositioning.coordinate(51.318784,12.2773504 ));
                          routeQuery.addWaypoint(QtPositioning.coordinate(51.3117764,12.280909000000065 ));
                          update();
                          }
                  }
      
      
      And I want route between 2 points, only by using the Addresse. 
      
      
      Button {
                          id: sendDataToItem
                          width: 100
                          height: 40
                          x: app_window.width / 2.7
                          text: "Send"
      
                      onClicked: {
                          fromAddress.country = txtFromAddressCountry.text;
                          fromAddress.city = txtFromAddressCity.text;
                          fromAddress.street = txtFromAddressStreet.text;
                          fromAddress.postalCode = txtFromAddressPostalCode.text;
      
                          toAddress.country = txtToAddressCountry.text;
                          toAddress.city = txtToAddressCity.text;
                          toAddress.street = txtToAddressStreet.text;
                          toAddress.postalCode = txtToAddressPostalCode.text;
      
                          //console.log(fromAddress);
                      }
                  } //sendDataToItem
      

      But it doesn't work, beacouse i need to use the coordinates. And I don't know, how I can translate the adrdresse to coordinates. And of the another side, when I use all whta is inside onClicked, then i don't see th way which i draw

      
      
      RouteModel {
                          id: routeBetweenPoints
                          plugin: Plugin { name: "osm" }
                          query: RouteQuery {id: routeQuery }
                          Component.onCompleted: {
                          routeQuery.addWaypoint(QtPositioning.coordinate(51.318784,12.2773504 ));
                          routeQuery.addWaypoint(QtPositioning.coordinate(51.3117764,12.280909000000065 ));
                          update();
                          }
                  }
      
      Know someone the resoult for this problem?
      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @DragonCoder said in How to routing between 2 points, when i have only the addresse and Problem with drawing the way:

      And I don't know, how I can translate the adrdresse to coordinates.

      see GeocodeModel

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      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