我正在尝试使用SKMaps实现导航功能,但我遇到了无法调用导航侦听器的onDestinationReached方法的问题。
// get navigation settings object
SKNavigationSettings navigationSettings = new SKNavigationSettings();
// set the desired navigation settings
navigationSettings.setNavigationType(SKNavigationSettings.SKNavigationType.SIMULATION);
navigationSettings.setPositionerVerticalAlignment(-0.25f);
navigationSettings.setShowRealGPSPositions(false);
// get the navigation manager object
navigationManager = SKNavigationManager.getInstance();
navigationManager.setMapView(mapView);
// set listener for navigation events
navigationManager.setNavigationListener(this);
// start navigating using the settings
navigationManager.startNavigation(navigationSettings);
navigationInProgress = true;
}
答案 0 :(得分:2)
一旦你离目的地很近,就应该触发onDestinationReached回调(取决于你所在的道路,如果你在城市范围内,“关闭”将在60到300米之间)。
是否在演示项目中成功触发了回调?您是否以任何方式修改了音频/文本建议配置文件?