maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [MOD] Enable Traffic/Automatic day-night in Drive & Traffic in Maps (https://talk.maemo.org/showthread.php?t=85353)

sony123 2012-07-27 07:27

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
I tried the different route option settings today. Shortest and fastest gave me distinctly different routes. But I am not sure about 3, it gave me the same route as fastest, when the traffic on the route was red.

I also experimented with adding this route option to AppSettingsModel and exposed it to setting menu. But unsurprisingly, only pre-defined variables (in settingManager) are allowed so I couldn't use the set method to store the route option. I then added it as a property to AppSettingsModel, but like the comments in the code suggested, property in this QtObject is not reliable and I couldn't change the property either.

sony123 2012-07-27 07:50

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Today I also took a look at Maps' qml codes under /usr/share/maps/qml, hoping I could find something interesting.

But the only thing I found was a setting to enable automatic 2D/3D transition (e.g. zoom out becomes 2D, zoom in becomes 3D), but the implementation wasn't robust. I didn't see any TODO and traffic-related info. The components implemented in QML are limited, most of the meat are hidden under C++. Maps uses a private MapViewer element for displaying the map, and the codes don't reveal much of what features this object supports.... Overall, the qml codes for Maps is kind of messy compared with Drive's.

The only things I changed so far are exposing the auto 2D/3D feature (not worth it) and get rid of the Analytic element...

anig 2012-07-27 07:55

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by sony123 (Post 1243637)
I tried the different route option settings today. Shortest and fastest gave me distinctly different routes. But I am not sure about 3, it gave me the same route as fastest, when the traffic on the route was red.

I also experimented with adding this route option to AppSettingsModel and exposed it to setting menu. But unsurprisingly, only pre-defined variables (in settingManager) are allowed so I couldn't use the set method to store the route option. I then added it as a property to AppSettingsModel, but like the comments in the code suggested, property in this QtObject is not reliable and I couldn't change the property either.

I don't think the optimised route is based on traffic. It's more likely that it's somewhere in the middle of fastest and shortest as both of those may lead to going along strange routes. In the symbian version there is an additional tick box for "reroute due to traffic".

godofwar424 2012-07-27 21:50

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by anig (Post 1243650)
I don't think the optimised route is based on traffic. It's more likely that it's somewhere in the middle of fastest and shortest as both of those may lead to going along strange routes. In the symbian version there is an additional tick box for "reroute due to traffic".

I wonder if the Symbian Drive app is coded in QML as well??

If so, any chance of getting hold of their QML files and see if we can sneak any features across ;)

mbanck 2012-07-28 15:51

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by sony123 (Post 1243646)
Today I also took a look at Maps' qml codes under /usr/share/maps/qml, hoping I could find something interesting.

One thing Maps has which Drive lacks (in my opinion) is ordering favorites by distance (Drive orders them by modification time, so it is pretty difficult to find the right favorite by swiping through if you have more than a few). I had a look at the Drive QML code a while back trying to change it but did not succeed so far.

There are some references in the Maps QML about favorites, but I could not find a place where the ordering was set or explicitly reordered on a quick look.

mbanck 2012-07-28 15:53

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by mbanck (Post 1244203)
There are some references in the Maps QML about favorites, but I could not find a place where the ordering was set or explicitly reordered on a quick look.

Oh, there is more code under /usr/lib/qt4/imports/ovi/connector/favorites, will have a second look there.

somedude 2012-07-28 18:12

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
I see that the time to distance is blank (- hr) when the distance is over an hour drive, once its below an hour it starts to show 58 min and such.
Using unstable patch.

rainisto 2012-07-28 21:19

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by somedude (Post 1244261)
I see that the time to distance is blank (- hr) when the distance is over an hour drive, once its below an hour it starts to show 58 min and such.
Using unstable patch.

are you sure that your running latest unstable, since it should have been fixed in latest version? See http://talk.maemo.org/showpost.php?p...&postcount=226

sony123 2012-07-29 06:17

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by mbanck (Post 1244205)
Oh, there is more code under /usr/lib/qt4/imports/ovi/connector/favorites, will have a second look there.

Wow there are tons of files under connector/... nice find!

mbanck 2012-07-29 12:57

Re: [MOD] How to enable Traffic/Automatic day-night in Drive for PR1.2/1.3
 
Quote:

Originally Posted by mbanck (Post 1244205)
Oh, there is more code under /usr/lib/qt4/imports/ovi/connector/favorites, will have a second look there.

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).


All times are GMT. The time now is 17:00.

vBulletin® Version 3.8.8