Walking Routing
Pedestrian calculations are implemented by setting the calculation rules for the walking route planning. There are also three modes of returning the walking calculations. The model refers to the driving route planning. Only one mode is listed here. The sample code is as follows:
// Navigation route planning
mRoutePlan = new RoutePlan(); // Instantiate the route plan
mRoutePlan.setStartPoint(mStartPoint); // Set the starting point of the line plan
mRoutePlan.setEndPoint(mEndPoint); // Set the line planning end point
mRoutePlan.setRule(RoutePlan.Rule.walk); // Set the calculation rule to walk the road
// Start planning based on route planning and using a single calculation method, returning a result as a route
mNaviSession.getInstance().startRoute(mRoutePlan, NaviSession.RouteMethod.single);
The effect is shown below:
