The Following 8 Users Say Thank You to sony123 For This Useful Post: | ||
![]() |
2012-07-31
, 08:20
|
Posts: 650 |
Thanked: 619 times |
Joined on Nov 2009
|
#263
|
Managed to get traffic shown up in Maps. However, traffic doesn't automatically load when panning the map, either the codes don't have it or I haven't found the codes responsible for this yet.
The Following User Says Thank You to sony123 For This Useful Post: | ||
![]() |
2012-07-31
, 08:22
|
Posts: 650 |
Thanked: 619 times |
Joined on Nov 2009
|
#264
|
The code which sorts by distance is there, but I do not have time to try to integrate it into Drive right now. I tried it before and the problem is that the favorites get retrieved without location, then get sorted, and then the distance (and full address) is added. I tried to access the location in the sort method, and also to sort by location afterwards, but it was difficult to access the right javascript objects for that, maybe somebody else has more luck.
Or maybe this isn't such a big issue after all (but it is sure annoying me).
![]() |
2012-08-01
, 07:28
|
Posts: 650 |
Thanked: 619 times |
Joined on Nov 2009
|
#265
|
![]() |
2012-08-01
, 07:42
|
Posts: 90 |
Thanked: 163 times |
Joined on Jan 2012
|
#267
|
![]() |
2012-08-01
, 07:48
|
Posts: 650 |
Thanked: 619 times |
Joined on Nov 2009
|
#268
|
Just got round to trying the traffic drive. In symbian when you click on an incident, i.e. the triangle icon, it brings up a description of it. Is this possible?
The Following User Says Thank You to sony123 For This Useful Post: | ||
![]() |
2012-08-01
, 08:39
|
Moderator |
Posts: 6,215 |
Thanked: 6,400 times |
Joined on Nov 2011
|
#269
|
![]() |
2012-08-01
, 09:58
|
|
Posts: 80 |
Thanked: 56 times |
Joined on Mar 2012
@ France
|
#270
|
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!
The changes are: make traffic toggle visible in MapSettingsUI.qml, fix un-comment traffic setting loading/storing in MapApi.js, and fix the wrong function argument for trafficObject.requestTrafficAt() in MapApi.js (original code doesn't have 2nd argument for requestTrafficAt(), the argument is radius in km btw). By doing these, traffic show up, just doesn't auto-refresh when panning.
Last edited by sony123; 2012-07-29 at 16:40.