voice hints update
This commit is contained in:
parent
ccf2eb28d3
commit
23d1812371
16 changed files with 564 additions and 102 deletions
|
|
@ -347,7 +347,11 @@ public class BRouterView extends View
|
|||
{
|
||||
if ( wp.ilat != 0 || wp.ilat != 0 )
|
||||
{
|
||||
wpList.add( wp );
|
||||
int nwp = wpList.size();
|
||||
if ( nwp == 0 || wpList.get( nwp-1 ) != wp )
|
||||
{
|
||||
wpList.add( wp );
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -405,6 +409,7 @@ public class BRouterView extends View
|
|||
RoutingContext rc = new RoutingContext();
|
||||
|
||||
rc.localFunction = profilePath;
|
||||
rc.turnInstructionMode = cor.getTurnInstructionMode();
|
||||
|
||||
int plain_distance = 0;
|
||||
int maxlon = Integer.MIN_VALUE;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,19 @@ public class BRouterWorker
|
|||
RoutingContext rc = new RoutingContext();
|
||||
rc.rawTrackPath = rawTrackPath;
|
||||
rc.localFunction = profilePath;
|
||||
|
||||
String tiFormat = params.getString( "turnInstructionFormat" );
|
||||
if ( tiFormat != null )
|
||||
{
|
||||
if ( "osmand".equalsIgnoreCase( tiFormat ) )
|
||||
{
|
||||
rc.turnInstructionMode = 3;
|
||||
}
|
||||
else if ( "locus".equalsIgnoreCase( tiFormat ) )
|
||||
{
|
||||
rc.turnInstructionMode = 2;
|
||||
}
|
||||
}
|
||||
if ( nogoList != null )
|
||||
{
|
||||
rc.prepareNogoPoints( nogoList );
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ public abstract class CoordinateReader
|
|||
|
||||
public abstract long getTimeStamp() throws Exception;
|
||||
|
||||
public abstract int getTurnInstructionMode();
|
||||
|
||||
public void readAllPoints() throws Exception
|
||||
{
|
||||
allpointsMap = new TreeMap<String, Map<String,OsmNodeNamed>>();
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ public class CoordinateReaderLocus extends CoordinateReader
|
|||
return t1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTurnInstructionMode()
|
||||
{
|
||||
return 2; // locus style
|
||||
}
|
||||
|
||||
/*
|
||||
* read the from and to position from a ggx-file
|
||||
* (with hardcoded name for now)
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ public class CoordinateReaderNone extends CoordinateReader
|
|||
return 0L;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTurnInstructionMode()
|
||||
{
|
||||
return 0; // none
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readPointmap() throws Exception
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ public class CoordinateReaderOrux extends CoordinateReader
|
|||
return t1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTurnInstructionMode()
|
||||
{
|
||||
return 0; // none
|
||||
}
|
||||
|
||||
/*
|
||||
* read the from and to position from a ggx-file
|
||||
* (with hardcoded name for now)
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ public class CoordinateReaderOsmAnd extends CoordinateReader
|
|||
return t1 > t2 ? t1 : t2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTurnInstructionMode()
|
||||
{
|
||||
return 3; // osmand style
|
||||
}
|
||||
|
||||
/*
|
||||
* read the from and to position from a gpx-file
|
||||
* (with hardcoded name for now)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ interface IBRouterService {
|
|||
// "pathToFileResult"-->String with the path to where the result must be saved, including file name and extension
|
||||
// -->if null, the track is passed via the return argument
|
||||
// "maxRunningTime"-->String with a number of seconds for the routing timeout, default = 60
|
||||
// "turnInstructionFormat"-->String selecting the format for turn-instructions values: osmand, locus
|
||||
// "trackFormat"-->[kml|gpx] default = gpx
|
||||
// "lats"-->double[] array of latitudes; 2 values at least.
|
||||
// "lons"-->double[] array of longitudes; 2 values at least.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue