Merge pull request #242 from vodie/master
export Oruxmaps Navigation instructions
This commit is contained in:
commit
0841216cda
6 changed files with 53 additions and 0 deletions
|
@ -528,6 +528,23 @@ public final class OsmTrack
|
|||
.append( "</wpt>\n" );
|
||||
}
|
||||
}
|
||||
|
||||
if ( turnInstructionMode == 6 ) // orux style
|
||||
{
|
||||
for( VoiceHint hint: voiceHints.list )
|
||||
{
|
||||
sb.append( " <wpt lat=\"" ).append( formatILat( hint.ilat ) ).append( "\" lon=\"" )
|
||||
.append( formatILon( hint.ilon ) ).append( "\">" )
|
||||
.append( hint.selev == Short.MIN_VALUE ? "" : "<ele>" + (hint.selev / 4.) + "</ele>" )
|
||||
.append( "<extensions>\n" +
|
||||
"<om:oruxmapsextensions xmlns:om=\"http://www.oruxmaps.com/oruxmapsextensions/1/0\">\n" +
|
||||
"<om:ext type=\"ICON\" subtype=\"0\">" ).append("" + hint.getOruxAction() )
|
||||
.append( "</om:ext>\n" +
|
||||
"</om:oruxmapsextensions>\n" +
|
||||
"</extensions>\n" +
|
||||
"</wpt>" );
|
||||
}
|
||||
}
|
||||
|
||||
for( int i=0; i<=pois.size() - 1; i++ )
|
||||
{
|
||||
|
|
|
@ -158,6 +158,27 @@ public class VoiceHint
|
|||
default : throw new IllegalArgumentException( "unknown command: " + cmd );
|
||||
}
|
||||
}
|
||||
|
||||
public int getOruxAction()
|
||||
{
|
||||
switch ( cmd )
|
||||
{
|
||||
case TU : return 1003;
|
||||
case TSHL : return 1019;
|
||||
case TL : return 1000;
|
||||
case TSLL : return 1017;
|
||||
case KL : return 1015; // ?
|
||||
case C : return 1002;
|
||||
case KR : return 1014; // ?
|
||||
case TSLR : return 1016;
|
||||
case TR : return 1001;
|
||||
case TSHR : return 1018;
|
||||
case TRU : return 1003;
|
||||
case RNDB : return 1008 + roundaboutExit;
|
||||
case RNLB : return 1008 + roundaboutExit;
|
||||
default : throw new IllegalArgumentException( "unknown command: " + cmd );
|
||||
}
|
||||
}
|
||||
|
||||
public void calcCommand()
|
||||
{
|
||||
|
|
|
@ -62,6 +62,9 @@ assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobbl
|
|||
|
||||
assign turncost = if junction=roundabout then 0
|
||||
else 90
|
||||
assign initialclassifier =
|
||||
if route=ferry then 1
|
||||
else 0
|
||||
|
||||
assign initialcost switch route=ferry 10000 0
|
||||
|
||||
|
|
|
@ -109,6 +109,10 @@ assign issidewalk not or sidewalk= or sidewalk=none sidewalk=no
|
|||
|
||||
assign turncost switch or shortest_way is_ldhr 0 turncost_value #v1.5
|
||||
|
||||
assign initialclassifier =
|
||||
if route=ferry then 1
|
||||
else 0
|
||||
|
||||
assign initialcost
|
||||
switch route=ferry 10000
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@ assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osman
|
|||
assign turncost = if junction=roundabout then 0
|
||||
else 90
|
||||
|
||||
assign initialclassifier =
|
||||
if route=ferry then 1
|
||||
else 0
|
||||
|
||||
assign initialcost switch route=ferry 20000 0
|
||||
|
||||
|
||||
|
|
|
@ -17,6 +17,10 @@ assign nodeaccessgranted or any_cycleroute lcn=yes
|
|||
|
||||
assign turncost 0
|
||||
|
||||
assign initialclassifier =
|
||||
if route=ferry then 1
|
||||
else 0
|
||||
|
||||
assign initialcost switch route=ferry 10000 0
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue