简体   繁体   中英

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. This is missing incase of android premium 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? or Is there any way to get instruction text from android itself?

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

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. 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.

You however could get a list of Maneuver Instructions using the HERE Routing API.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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