我无法找到一种方法,使我的应用程序(目前实现了SKmaps,可以显示路线)像汽车导航器一样显示和跟随路线。
例如:
这是我的“路线加载”方法:
例如:
![enter image description here](https://istack.dev59.com/blDZZ.webp)
@Override
public void onAllRoutesCompleted() {
SKNavigationSettings navigationSettings = new SKNavigationSettings();
navigationSettings.setNavigationType(SKNavigationSettings.SKNavigationType.REAL);
navigationSettings.setNavigationMode(SKNavigationSettings.SKNavigationMode.CAR);
navigationSettings.setCcpAsCurrentPosition(true);
navigationSettings.setFcdEnabled(true);
SKNavigationManager navigationManager = SKNavigationManager.getInstance();
navigationManager.setMapView(mapView);
navigationManager.setNavigationListener(MainActivity.this);
navigationManager.startNavigation(navigationSettings);
}