|
2011-01-19
, 21:29
|
Posts: 244 |
Thanked: 354 times |
Joined on Jul 2010
@ Scotland
|
#142
|
|
2011-01-19
, 21:48
|
|
Posts: 397 |
Thanked: 241 times |
Joined on Mar 2010
@ Melbourne, Australia
|
#143
|
The Following User Says Thank You to travla For This Useful Post: | ||
|
2011-01-19
, 21:55
|
Posts: 137 |
Thanked: 150 times |
Joined on Jan 2010
|
#144
|
*coughs*
"At the roundabout, take the tenth exit."
Superb! Still, significant progress. I've got a longish drive to do tomorrow, so I'll have this running. Let's see how it gets on.
|
2011-01-20
, 10:10
|
Posts: 262 |
Thanked: 206 times |
Joined on May 2010
|
#147
|
Update 20/01/2010
CormacB has released a new version with html5 support (so that it does not require any servers for sound production). See this post for the html file: Index.html and this post for the direction on how to install: Install directions
-=Original Post=-
Greetings forum, I bring to you today, to the few that still use it or care, a couple of features for OVI maps
Some of us would remember when OVI maps had that tilt control which allowed the rotation of the map, add this with 3D buildings feature, and you had something pretty to look at, though with the introduction of Pr1.2 they removed that, but today ladies and gentlemen I bring it back!
But wait, thats not all! I with the new Ovi Maps version we have, it has a nice feature to allow maneuvers to be shown when you select one of those little dots on the route. This I thought was an excellent idea as we can see the upcoming turn, sadly it wasn't the case as it just showed one at a time and only when you select it, kinda useless when driving really. So I added another button under the route calculation button to show them all!
While looking around at the code, I did notice a feature for guidance including the possibility of voice guidance. However it does not seem to be finished or we are missing a plugin to make it work (little snippet below). I might play around with it, but I doubt it'll work, but on the bright side it could be coming in the future
Lastly some proof http://www.youtube.com/watch?v=sKcRFteeJOgCode:stopNavigation: function () { this._guidance.stop(); this.fireEvent(new nokia.aduno.utils.Event(GuidanceModel.EVENT_GUIDANCE_STOPPED)); if (this._positionChangeSimulator) { this._positionModel._setPositionProvider(null); this._positionChangeSimulator.deactivate() } }, pauseNavigation: function (aPause) { if (aPause === true || aPause === undefined) { this._guidance.pause() } else { this._guidance.resume() } }, repeatLastVoiceCommand: function () { this._guidance.repeat() }, isNavigationRunning: function () { if (this._guidance) { return this._guidance.isRunning() } return false }, getNextManeuver: function () { if (this._guidance.className !== "GuidanceMockup") { return this._guidance.nextManeuver } else { return new Maneuver(this._guidance.getNextManeuver()) } },
If you feel brave enough and wish to experiment with this version, please back up the old ovi maps index.html file found in "/usr/share/nokia-maps/html" (rename it to something else) then copy the new "index.html" file into the folder. For the maneuver images, you'll need to put the new image I made into the "/usr/share/nokia-maps/html/pfw/images/spices/newroutesigns" folder (you'll need to make it, the zip file contains the full path for assistance).
Feedback is welcome
Update 25/12/2010
Added a new feature as requested by elie-7. The file is attached below. Be warned though, it shows ALL of the POI, so the screen might be a bit messy sometimes, especially in the city (as you can see in the picture ). Also fixed a slight error (figured out firebug can do track the errors for me ). A new image was created for this (which is looking terrible ) so remember to copy that in too. In the future I will try make the POI more configurable, but I have a feeling it'll be a fair bit of work
Attachment 16526
p.s. If I shouldn't share Nokia's code, please delete this thread
|
2011-01-20
, 10:23
|
Posts: 137 |
Thanked: 150 times |
Joined on Jan 2010
|
#148
|
The Following User Says Thank You to CormacB For This Useful Post: | ||
|
2011-01-20
, 10:24
|
|
Posts: 397 |
Thanked: 802 times |
Joined on Jan 2010
@ Sydney
|
#149
|
The Following User Says Thank You to Blaizzen For This Useful Post: | ||
|
2011-01-20
, 10:29
|
|
Posts: 397 |
Thanked: 802 times |
Joined on Jan 2010
@ Sydney
|
#150
|
Hmmm. Last night everything was working well, but this morning not so much.
It seems to work better when "simulating" by dragging the view around than when actually tracking the device position. I am not sure why that is the case as all the gets used is the position and speed. And the speed is undefined all the time.
I definitely am using the wrong source for position updates (or using it wrong), but it will take a while to figure out what a better way would be.
_updatePosition: function () { if (this._positionModel && this._positionModel.isLivePositioningData() && this._positionModel.hasValidAccuracy()) { this._position = this._positionModel.getPosition(); this._usingLastKnownPosition = false } else { this._position = this._positionModel.getLastKnownPosition(); this._usingLastKnownPosition = true } if (this._usingLastKnownPosition === false) { var accuracy = this._positionModel.getPositioningAccuracy(); if (accuracy > PositionModel.ACCURACY_THRESHOLD) { this._usingLastKnownPosition = true } } currentPosGlobal = this._position; },
var m = this._currentRoute.getManeuvers()[this._nextMan].getPosition(); var p = currentPosGlobal; var dist = this._mapModel.distanceTo(m,p);
I've realised something kind of amusing: the position we are tracking with PositionModel is NOT the position of the phone, it is the position of the centre of the view! But the events are only sent when the GPS updates, not when the view is updated. I don't know if this is a bug or what. In any case directions will only work when you have the view tracking the position.