[MOD] Enable Traffic/Automatic day-night in Drive & Traffic in Maps
View Single Post
07-19-2012 , 11:29 AM
Posts: 51 | Thanked: 89 times | Joined on Jul 2012
So about traffic and taking it into account for routing:
in models/RoutingModel.qml, line 44 reads:
RouteOptions.TYPE_FASTEST translates to "1" if you print it out on the console. If I change that to
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:
(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:
View Public Profile
Send a private message to mbanck
Find all posts by mbanck