View Single Post
Blaizzen's Avatar
Posts: 397 | Thanked: 802 times | Joined on Jan 2010 @ Sydney
#53
Originally Posted by Android_808 View Post
I'm trying to put together some code to enable GuidanceMockUp to provide route simulation. In the code we have two simulators, S60SimulatorPositionProvide and FfSimulatorPositionProvider. It checks for browser.S60 and creates as necessary. I was thinking along the lines of adding a button that appears after a route has been calculated that allows a simulation of the route to be played. I thought this may be beneficial for testing when attempting to add voice navigation. As of yet I've not coded anything other than remove the statement which checks to see if GuidanceMockup can provide guidance.
If i remember correctly, GuidanceMockup is only created on the computer not the N900 hence you will need to follow the GuidanceModel Class and try that. Not sure if I mentioned it before or not, but you can make a global variable (place it right at the top of the javascript), assign to it the plugin control and then you'll be able to call it from anywhere in the program (like this).
Code:
this.guidance = new nokia.maps.pfw.GuidanceModel(this._pluginControl, this.routing, this.position, this.map);
				VoiceGuidance = this.guidance;
You should then be able to call things like
VoiceGuidance.getNextManeuver() and see if it works (which will require something to show the result on the N900).


But good luck trying to get it to work I'd like to even be able to see just text on the screen with directions one day