我正在从routelistener覆盖allowreroutefrom()函数,以在检测到offroutelistener时提取我的自定义路由。我返回false,并使用自定义计算路线开始新的导航。但我想在发生重新路由时显示“重新路由”标题指令。如何在标语中给出自己的指示?
答案 0 :(得分:0)
InstructionView
具有showRerouteState()
和hideRerouteState()
方法,您可以使用:
@Override
public boolean allowRerouteFrom(Point offRoutePoint) {
// Fetch new route
InstructionView instructionView = findViewById(R.id.instructionView);
instructionView.showRerouteState();
return false;
}