View Full Version : [Android] Simulating rerouting

09.06.2015, 03:49
Is there any way to simluate the re-routing when using navigation in SKNavigationType.SIMULATION mode? I tried changing current user location explicitly inside onCurrentPositionUpdate(SKPosition currentPosition) method like this, but it isn't working:

public void onCurrentPositionUpdate(SKPosition currentPosition) {

this.currentPosition = currentPosition;
if (mapView != null) {

if(iteration >= 5) {
Toast.makeText(MapActivity.this, "Changed location", Toast.LENGTH_LONG).show();
this.currentPosition = new SKPosition();
this.currentPosition.setCoordinate(new SKCoordinate(101.618133, 3.025863));

mapView.reportNewGPSPosition(this.currentPosition) ;

11.06.2015, 14:30
Yes, you can simulate the re-routing. You have to use the blockRoad method from SKNavigationManager. Please check the doc here: http://developer.skobbler.ro/docs/android/com/skobbler/ngx/navigation/SKNavigationManager.html#blockRoad(double)