Thread
:
[MOD] Enable Traffic/Automatic day-night in Drive & Traffic in Maps
View Single Post
sony123
2012-08-01 , 07:28
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#
265
Here it is the Map traffic patch for testing:
Maps traffic patch unstable
I forgot to backup the original files so pulled the ones from N950 for diff.
As a result, please apply it with caution and at your own risk.
Make sure you backup the following folder first!
/usr/lib/qt4/imports/ovi/connector/map
I don't know how to restore Maps in case anything failed. I saw two Maps-related packages, maps and maps-guard, maybe try reinstalling both would help. (<- needs verifying)
To activate traffic, click the setting button on lower right map view (the one you click to select 'public transport', '3d mode', etc.) and toggle 'traffic'. Traffic only gets fetched when map center changes beyond certain threshold, so traffic might not show up immediately. During testing I noticed a few tricks to help traffic shows up:
1. Panning the Maps randomly, for example, drawing circles. Maybe this forces maps redraw....
2. Zooming in/out.
3. Swipe out of Maps then back can help Maps refreshes the map view and hence displays traffic.
For detailed changes, the original code makes traffic request whenever map center shifts beyond 5000 (I believe it means 5km). During testing, I found that requesting traffic frequently doesn't necessarily help displaying traffic, so I referenced Drive's code and add a QML Timer to reduce the number of requests made while panning the map.
I also tweaked the triggering threshold and the request radius... the tweaking is in no way scientific, but I settled on (7km, 30km). FYI, Drive uses (40km, 50km). I did try Drive's setting, but feel it doesn't work as well. Seems to me Maps needs more requesting, but might just be my imagination. Anyway, I encourage people to try other combinations, as well as the interval for the traffic timer.
By the way, if you want to try playing with the parameters, you can un-comment the 'trafficInfo' Text element in MapViewer.qml and the other lines containing trafficInfo. It will display debug messages directly on the top left corner of map view and makes it easier for you to tell when traffic request is sent.
Please post feedback if you can, thanks and enjoy!
Last edited by sony123; 2012-08-02 at
03:49
.
Quote & Reply
|
The Following 3 Users Say Thank You to sony123 For This Useful Post:
anig
,
Iryus
,
jhwan
sony123
View Public Profile
Send a private message to sony123
Find all posts by sony123