Thread
:
[MOD] Enable Traffic/Automatic day-night in Drive & Traffic in Maps
View Single Post
mbanck
2012-07-19 , 15:29
Posts: 78 | Thanked: 135 times | Joined on Jul 2012
#
189
So about traffic and taking it into account for routing:
in models/RoutingModel.qml, line 44 reads:
routeType: RouteOptions.TYPE_FASTEST
RouteOptions.TYPE_FASTEST translates to "1" if you print it out on the console. If I change that to
routeType: RouteOptions.TYPE_SHORTEST
that translates to "2", and I actually get the shortest route (will dismiss highways etc.).
Now I bet that the underlying code actually allows for traffic to be taken into account, my old Symbian Ovi Maps routing has an option "optimal", however RouteOptions.TYPE_OPTIMAL or RouteOptions.TYPE_OPTIMIZED does not seem to work (you get an error like "unable to assign [undefined] to int routeType" on the console).
However, when I set it to "3" manually via a property, I do not get an error. On the other hand, on some initial tests, traffic jams do not seem to get evaded either, so I am not sure what it means.
But if people want to test around, here is a patch:
http://paste.debian.net/download/179798
(Setting routeOptionType to 2 instead of 3 clearly selects the shortest route for me)
Quote & Reply
|
The Following 6 Users Say Thank You to mbanck For This Useful Post:
jecargo22
,
jhwan
,
kfahoo
,
MaddogG
,
solstice88
,
sony123
mbanck
View Public Profile
Send a private message to mbanck
Find all posts by mbanck