just found that I can check the traffic with Google Maps.
I tried out the fantastic script with Waze, but don't know why, in my case, the result I get is always very far from the reality (sometimes half the time I get using the Waze App on Android).
So I would like to try Google Maps.
I found some info here, you need to get a Google API key for free and you have a daily limimation on using it (if I remember well something like 1000).
https://developers.google.com/maps/docu ... Parameters
I tried using the first and simple http, https://maps.googleapis.com/maps/api/di ... zzzzzzzzzz and I got a result like this.
Code: Select all
{
"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "zzzzzz",
"types" : [ "route" ]
},
{
"geocoder_status" : "OK",
"place_id" : "aaaaaaaaa",
"types" : [ "street_address" ]
}
],
"routes" : [
{
"bounds" : {
"northeast" : {
"lat" : xxxxxx,
"lng" : yyyyyy
},
"southwest" : {
"lat" : xxxxxx,
"lng" : yyyyyy
}
},
"copyrights" : "Map data ©2016 Google",
"legs" : [
{
"distance" : {
"text" : "12,7 km",
"value" : 12736
},
"duration" : {
"text" : "18 min",
"value" : 1105
},
"end_address" : "xxxxxx",
"end_location" : {
"lat" : xxxxx,
"lng" : yyyyyy
},
"start_address" : xxxxxx",
"start_location" : {
"lat" : xxxxxx,
"lng" : yyyyyy
.....
And it seems to me more real.
What I don't know is how to get it from a lua script.
Any suggestion?
Thanks
Vittorio