NavigationManager在哪里?

时间:2017-01-04 23:39:16

标签: here-api

NavigationManager在哪里?在旧版本中,我可以使用NavigationManager来模拟路径,例如从SF到LA。

NavigationManager navigationManager = NavigationManager.getInstance();
       navigationManager.addNewInstructionEventListener(new WeakReference<>(mNewInstruction));
       navigationManager.addGpsSignalListener(new WeakReference<>(mGpsSignalListener));
       navigationManager.addRerouteListener(new WeakReference<>(mRerouteListener));
       navigationManager.addPositionListener(new WeakReference<>(mPositionListener));
       navigationManager.addSafetySpotListener(new WeakReference<>(mSafetySpotListener));
       navigationManager.addLaneInfoListener(new WeakReference<>(mLaneInfoListener));
       navigationManager.addRealisticViewListener(new WeakReference<>(mRealisticViewListener));
       //set the map where the navigation will be performed
       navigationManager.setMap(mMap);

NavigationManager.Error error = navigationManager.simulate(mapRoute.getRoute(),50);

请问您如何使用最新的android sdk实现模拟功能?

提前致谢。

1 个答案:

答案 0 :(得分:1)

根据最新文档,这些API没有改变:NavigationManager API Reference

但是,在项目中包含HERE SDK库的方式已发生变化。它现在作为AAR文件提供,而不是作为单独的jar和本机库文件提供。您确定要正确包含HERE SDK并且它存在于您的类路径中吗?有关新步骤的详细信息,请参阅this tutorial