Reply
Thread Tools
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#261
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 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.
 

The Following 8 Users Say Thank You to sony123 For This Useful Post:
Posts: 78 | Thanked: 135 times | Joined on Jul 2012
#262
Originally Posted by sony123 View Post
Managed to get traffic shown up in Maps.
Whoohoo!!!!
 

The Following User Says Thank You to mbanck For This Useful Post:
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#263
Originally Posted by sony123 View Post
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.
So... traffic actually gets loaded when panning the map, but for whatever reasons, the map view in Maps seems to have a harder time displaying the traffic data. Drive also doesn't always show traffic data when panning, but I feel its behavior is more consistent.

I have tried to understand why and see if there is any workaround, but decided I should give up. It's better to give users options than to perfect a feature that isn't implemented by me.

Again, I don't have a lot of time to clean up what I modified on device. But I hope I can get the diff done this week.......
 

The Following User Says Thank You to sony123 For This Useful Post:
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#264
Originally Posted by mbanck View Post
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).
This sounds interesting, I might give it a try after getting the Maps mod cleaned up.
 
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.
 

The Following 3 Users Say Thank You to sony123 For This Useful Post:
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#266
Just to clarify, the Maps patch is currently not in colin's all-in-one unstable patch, but should be integrate into it once it matures.
 

The Following User Says Thank You to sony123 For This Useful Post:
Posts: 90 | Thanked: 163 times | Joined on Jan 2012
#267
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?
 
Posts: 650 | Thanked: 619 times | Joined on Nov 2009
#268
Originally Posted by anig View Post
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?
http://talk.maemo.org/showthread.php?p=1241087#post1241087


In short, possible but not easy.
 

The Following User Says Thank You to sony123 For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#269
sony123 if you want to re-install maps just do apt-get install maps --reinstall

you don't need to install maps-guard...
 
Iryus's Avatar
Posts: 80 | Thanked: 56 times | Joined on Mar 2012 @ France
#270
Originally Posted by sony123 View Post
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!
Hello,

How to apply your patch because i tried several methods and it doesn't work. Thank you in advance
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:01.