aboutsummaryrefslogtreecommitdiffstats
path: root/app/qml/Main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'app/qml/Main.qml')
-rw-r--r--app/qml/Main.qml15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/qml/Main.qml b/app/qml/Main.qml
index 525758e..3d51c7d 100644
--- a/app/qml/Main.qml
+++ b/app/qml/Main.qml
@@ -46,7 +46,7 @@ ApplicationWindow {
}
onTextMessageReceived: {
- console.log("tbtnavi:onTextMessageReceived: " + message)
+ // console.log("tbtnavi:onTextMessageReceived: " + message)
var message_json = JSON.parse(message)
//analyse the infomation from the naviapi service
@@ -59,7 +59,7 @@ ApplicationWindow {
var longitude = message_json[2].data[0].DemoLongitude
var distance = message_json[2].data[0].DemoDistance
var direction = message_json[2].data[0].DemoDirection
- console.log("tbtnavi: distance = " + distance + "direction = " + direction)
+ // console.log("tbtnavi: distance = " + distance + "direction = " + direction)
if (st_demo_state === true){
mapwindow.do_setCoordinate(latitude,longitude)
}
@@ -88,10 +88,10 @@ ApplicationWindow {
}
else if(message_json[2].event === event_gps){
if (st_demo_state === false){
- console.log ("tbt:Receive Event======event_gps")
+ // console.log ("tbt:Receive Event======event_gps")
var lat = message_json[2].data.latitude
var lon = message_json[2].data.longitude
- console.log ("tbt:Receive Event lat====== " + lat+" "+"lon======"+lon)
+ // console.log ("tbt:Receive Event lat====== " + lat+" "+"lon======"+lon)
mapwindow.do_setCoordinate(lat,lon)
}
@@ -112,15 +112,18 @@ ApplicationWindow {
else if(message_json[2].request.info === verb_getrouteinfo)
{
var routes = message_json[2].response[0].AllRoutes
+ var startlat = message_json[2].response[0].StartLatitude
+ var startlon = message_json[2].response[0].StartLongitude
var currentlat = message_json[2].response[0].CurrentLatitude
var currentlon = message_json[2].response[0].CurrentLongitude
var destposlat = message_json[2].response[0].DestinationLatitude
var destposlon = message_json[2].response[0].DestinationLongitude
- mapwindow.do_addRoutePoint(currentlat,currentlon,destposlat,destposlon,routes)
+// mapwindow.do_addRoutePoint(currentlat,currentlon,destposlat,destposlon,routes)
+ mapwindow.do_addRoutePoint(startlat,startlon,destposlat,destposlon,routes)
}
}
else{
- console.log("Raw response: " + message)
+ // console.log("Raw response: " + message)
}
}
active: false