Turn-by-turn instructions
To use a route in a turn-by-turn navigation context, you must include selected options when creating a request. The key parameters are summarized below, along with an example of routing options:
val amsterdam = GeoPoint(52.377956, 4.897070)val rotterdam = GeoPoint(51.926517, 4.462456)val routePlanningOptions = buildRoutePlanningOptions( itinerary = Itinerary(origin = amsterdam, destination = rotterdam), language = Locale.ENGLISH, instructionPhoneticsType = InstructionPhoneticsType.Ipa,)Vehicle heading
Once you are driving, it’s important to request a route that goes in a specific direction. For that purpose, the heading parameter should be used. It describes the directional heading of the vehicle, expressed in degrees starting at true North and increasing clockwise:
- North is 0 degrees.
- East is 90 degrees.
- South is 180 degrees.
- West is 270 degrees.
Instructions
To obtain guidance instructions, the guidanceOptions parameter needs to be set.
Phonetics
The phoneticsType parameter specifies whether to include the phonetic transcription of street names, signpost text, and road numbers in the instructions of the response. In areas where phonetic information is not available, the result is not returned.
Possible values are:
-
InstructionPhoneticsType.None- Do not include phonetic transcriptions in the response. -
InstructionPhoneticsType.Ihp- Return phonetic transcriptions in the L&H+ format from Cerence Inc. -
InstructionPhoneticsType.Ipa- Return phonetic transcriptions in the IPA (International Phonetic Alphabet).
Extended guidance sections
The extendedSections parameter specifies whether to include sections of type lane and roadShield in the response. All other section types are always included.
Possible values are:
-
ExtendedSections.None- Do not include extended guidance sections in the response. -
ExtendedSections.All- Include the extended guidance section types in the response.
Next steps
Since you have learned how to work with turn-by-turn instructions, here are recommendations for the next steps: