The above example is a complex approach. May I suggest to add a function like rallyblitz at the already existing roadbook function. This would create a widget or overlay witch will act on an co-existing gpx File. Software like rally navigator can make this very easy, see this video as an example.
Good luck and keep up the good work!