Navigation SDK 提供了多种将导航体验集成到应用中的方法。本页将介绍 Google 导航体验是什么,以及它与 Navigation SDK 中提供的其他导航体验有何不同。
什么是 Google 导航体验?
Google 导航体验是指使用 Navigation SDK 嵌入逐向导航体验,该体验使用 Google 提供的界面元素和视觉效果,类似于 Google 地图应用中的导航体验。将 Google 导航体验嵌入应用后,您无需从头开始构建导航体验,但仍可以修改部分体验。或者,如果您需要比 Google 导航体验提供的更多自定义选项,可以从 Navigation SDK 请求逐向导航 Feed,然后提供和管理自己的界面元素。
有效导航。应用进入主动导航状态后,会使用设备位置信息来保持主动引导。您可以配置对您的使用情形有意义的事件监听器,例如用于路线变更和到达目的地剩余时间的事件监听器。在有效导航期间,Navigation SDK 会提供与 Google 地图应用中类似的界面组件。例如,导航体验会显示一个标准的 Google 地图图层,其中包含转向引导卡片、路况图层、替代路线和限速等视觉元素。
停止导航。您的应用以最适合相应用例的方式终止导航会话,例如使用在用户到达目的地时触发的到达监听器。
如何修改 Google 导航体验?
一般来说,您可以修改 Google 导航体验,使其具有不同的配色方案、摄像头视图、额外的转弯指导和事件响应触发器。以下列表介绍了您可以进行的一些调整。该列表并不详尽。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-16。"],[[["The Google Navigation SDK enables developers to easily integrate turn-by-turn navigation into their apps using pre-built UI elements similar to the Google Maps app."],["Developers can customize aspects of the Google navigation experience like color schemes, camera views, and guidance information, but for full control, a custom navigation experience is recommended."],["The Google navigation experience involves a three-step flow: starting navigation by defining the destination, active navigation with real-time guidance, and stopping navigation upon arrival."],["The Navigation SDK offers various options for modifying the navigation UI, such as showing or hiding elements, adjusting traffic and speed limit information, and customizing the map and camera."]]],[]]