简体   繁体   English

HERE 地图在 android 中逐个导航文本

[英]HERE maps Turn by turn navigation text in android

This rest end point of HERE ( https://developer.here.com/documentation/routing/topics/resource-calculate-route.html ) returns response including the maneuver instruction in either text or html format. HERE( https://developer.here.com/documentation/routing/topics/resource-calculate-route.html )的这个rest端点返回响应,包括文本或html格式的机动指令。 This is missing incase of android premium SDK.这是缺少 android 高级 SDK 的情况。 Maneuver object doesn't have instruction text with it.机动对象没有说明文本。 Should I create my own sentence from the Turn enum value and Action of maneuver?我应该从 Turn 枚举值和 Action of 机动创建我自己的句子吗? or Is there any way to get instruction text from android itself?或者有没有办法从android本身获取指令文本?

I'm concerned to create my own sentences since the documentation page( https://developer.here.com/documentation/android-starter/dev_guide/topics/routing-starter.html ) of android sdk says我担心创建自己的句子,因为 android sdk 的文档页面( https://developer.here.com/documentation/android-starter/dev_guide/topics/routing-starter.html )说

Applications can provide route information to users in two ways:应用程序可以通过两种方式向用户提供路线信息:

  1. A line rendered on a map that displays a connecting path between all waypoints地图上呈现的一条线,显示所有航点之间的连接路径
  2. Turn-by-turn directions in text format文本格式的转弯指示

If this is already existing, I could use that straight away!如果这已经存在,我可以立即使用它! Thanks.谢谢。

There is turn instruction text in Maneuver object. Maneuver对象中有转弯指令文本。 Get it this way - 这样获得-

String nextTurnName = mManeuvers.get(mNextManeuverIndex).getTurn().name();

Please note that direction of next turn is in next Maneuver object in list, and distance to next turn is in current Maneuver object. 请注意,下一弯的方向在列表中的下一个操纵对象中,而到下一弯的距离在当前的操纵对象中。

HERE SDK Premium does not provide Maneuver Instructions pre- start of Navigation nor can you get a list of Maneuver Instructions at any point. HERE SDK Premium 不提供导航开始前的机动指令,您也无法在任何时候获得机动指令列表。

You however could get a list of Maneuver Instructions using the HERE Routing API.但是,您可以使用 HERE Routing API 获取机动指令列表。

https://developer.here.com/documentation/routing-api/dev_guide/topics/use-cases/actions.html https://developer.here.com/documentation/routing-api/dev_guide/topics/use-cases/actions.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM