[Interest] Qt 5.0 Location - QML show a Route

Thomas.Gietlhuber-EXT at continental-corporation.com Thomas.Gietlhuber-EXT at continental-corporation.com
Tue Aug 21 12:11:18 CEST 2012


Hi, I want to try out some functions of Qt Location 5.0.
I’m only using QML Quick 2.0.
So I already activated and added the Plugin, “nokia” with the token and 
the app_id.
I also added the Proxy, so that so Map can be loaded.
Showing the Map and navigate to some Places with coordinates already 
works.
Map Circles and MapQuickItem works, too.
Now my problem, I added:

        Plugin {
                id: myplugin
                name : "nokia"
                parameters: [
                    PluginParameter { name: "app_id"; value: "xxx" },
                    PluginParameter { name: "token";  value: "xxx" }
                ]
            }


        Map{
          plugin: myplugin
         
          Route{
            id: routeData
          }
         
          RouteQuery {
            id: aQuery
          }
         
          RouteModel {
            id: routeModel
            plugin: myplugin
            query: aQuery
            autoUpdate: false
          }
         
          MapItemView {
            model: routeModel
            delegate: routeDelegate
          }
         
          Component {
            id: routeDelegate
         
            MapRoute {
              route: routeData
              line.color: "blue"
              line.width: 5
              smooth: true
            }
          }
        }
Now, on klick I change in JavaScript
                
        aQuery.addWaypoint(startcoordinates)
        aQuery.addWaypoint(endcoordinates)
        aQuery.travelModes = RouteQuery.CarTravel
        routeModel.update()
There is no error shown, but it dows not work, too.

When I read and display the Data of routeData, then there is no error, 
too.
But 
        routeData.distance
and 
        routeData.travelTime
both is 0.

Can anyone help me?
Thank you.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120821/1c2fb51c/attachment.html>


More information about the Interest mailing list