QML - Afficher un Itinéraire Open Street Map avec QLocation

Fermé
perintos Messages postés 3 Date d'inscription vendredi 22 mai 2015 Statut Membre Dernière intervention 22 mars 2016 - Modifié par perintos le 22/03/2016 à 22:55
Bonjour,

Dans le code source QML que j'utilise ci-dessous, j'affiche une carte Open Street Map avec deux points avec leur coordonnées GPS. Cependant je n'arrive pas à afficher l'itinéraire qui amène d'un point à un autre. Le tracé refuse de s'afficher. Je travail avec QT créator 3.0.6 basé sur Qt 5.5.1 et windows 64 bits

Des warning que je ne comprend pas apparaissent en sortie d'application :
qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_client_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_client_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_1_server_method
qt.network.ssl: QSslSocket: cannot resolve TLSv1_2_server_method
qt.network.ssl: QSslSocket: cannot resolve SSL_select_next_proto
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
qt.network.ssl: QSslSocket: cannot resolve SSL_get0_next_proto_negotiated


Si quelqu'un a la moindre information, je suis preneur, ça fait 3 jours que je cherche, j'ai trouvé deux trois truc mais rien ne passe. Je ne suis même pas certain que ces warnings me préviennent réellement de ce pourquoi mon code ne fonctionne pas ..

Voici mon .qml :
import QtQuick 2.0
import QtPositioning 5.2
import QtLocation 5.3

Item {

width:1024 ; height: 768

PositionSource{
id : src
active : true
onPositionChanged: {
map.center = position.coordinate;
}
}

Map {
id: map
anchors.fill : parent
height: parent.height ; width : parent.width

plugin: Plugin { name :"osm"}

center: QtPositioning.coordinate(48.855602, 2.351962)
zoomLevel: 18

MapQuickItem{
id: marker
coordinate: QtPositioning.coordinate(48.855602, 2.351962)
sourceItem: Image {
id : markerlogo
width: 32 ; height: 32
source: "file:\marker.ico"
}

anchorPoint.x : marker.width /2
anchorPoint.y : marker.height
}

MapQuickItem{
id: marker2
coordinate: QtPositioning.coordinate(48.856170506415175, 2.350433)
sourceItem: Image {
id : markerlogo2
width: 32 ; height: 32
source: "file:\marker.ico"
}

anchorPoint.x : marker.width /2
anchorPoint.y : marker.height
}

MapItemView{
model : routeModel
delegate: Component{
MapRoute{
route: routeData
line.color: "blue"
line.width: 4

}
}
}
}

RouteModel{
id: routeModel
plugin : map.plugin
query : RouteQuery{ id : routeQuery }
Component.onCompleted: {
routeQuery.clearWaypoints();
routeQuery.addWaypoint(QtPositioning.coordinate(48.856170506415175, 2.350433));
routeQuery.addWaypoint(QtPositioning.coordinate(48.855602, 2.351962));
routeQuery.travelModes = RouteQuery.PedestrianTravel;
routeQuery.setFeatureWeight(0, 0);
routeModel.update();
}
}
}


Afin de compiler ce code je me suis servis de la vidéo d'un conférencier qui lui ne rencontre pas toutes ces erreurs. En voici le lien : https://www.youtube.com/watch?v=2u5wnrx6J-E

Merci à toutes personnes qui aura des informations concernant QT créator 5, les warnings affichés ou encore la solution à mon problème dans sa globalité. Il s'agit de mon projet de BTS. Merci d'avance !