Guided Navigation

Guided navigation enables the most accurate possible transmission of a calculated route to the PTV Navigator.

This example shows how to request a route with guide navigation.


						https://api.myptv.com/routing/v1/routes?waypoints=48.8281361,8.130226135&waypoints=48.847332494,8.058471679&results=GUIDED_NAVIGATION&options[trafficMode]=AVERAGE
				

The result of the request above will look like this:


			{
				"distance": 6303,
				"travelTime": 491,
				"trafficDelay": 0,
				"violated": false,
				"guidedNavigation": "W0NMSUVOVF0KUk9VVEVOQU1FPVBUViBEZXZlbG9wZXIgLSBndWlkZWQgbmF2aWdhdGlvbiByb3V0ZSBleHBvcnQKTUFQX1ZFUlNJT049dW5rbm93bgoKW0NPT1JESU5BVEVTXQpTVEFUSU9OMT04OTYwNjEsNjI0MjAwNApTVEFUSU9OMj05MDQwMzksNjIzODc2MAoKW1ZJU0lURURdClNUQVRJT04xPTAKU1RBVElPTjI9MAoKW1N0YXRpb24yU2VnbWVudGNlbnRlcnNdClBvaW50MT04OTYwNzYsNjI0MjAwMywxNDkKUG9pbnQyPTg5NjExMCw2MjQyMDIzLDUwClBvaW50Mz04OTY2NDQsNjI0MjA2OSw1MQpQb2ludDQ9ODk2NzQ4LDYyNDIwMTYsMTQwClBvaW50NT04OTk4MTYsNjIzOTkxMiwxMTAKUG9pbnQ2PTkwMTYwOCw2MjM5NjE0LDk3ClBvaW50Nz05MDM2NTQsNjIzODY1Miw1NgpQb2ludDg9OTAzOTg5LDYyMzg5MDIsMTM0Cg=="
			}
			

The result value of guidedNavigation is a base64 encoded representation of the route that can be used for guided navigation.

The base64 binary has to be decoded and saved as text file with the extension .bcr and can then be imported in PTV Navigator and used for navigation.

You can decode the base64 binary string e.g. in Javascript with 'atob' or manually via the web page https://www.base64decode.org.

A result of a decoded base64 binary will look like this:


				[CLIENT]
				ROUTENAME=PTV Developer - guided navigation route export
				MAP_VERSION=unknown

				[COORDINATES]
				STATION1=896061,6242004
				STATION2=904039,6238760

				[VISITED]
				STATION1=0
				STATION2=0

				[Station2Segmentcenters]
				Point1=896076,6242003,149
				Point2=896110,6242023,50
				Point3=896644,6242069,51
				Point4=896748,6242016,140
				Point5=899816,6239912,110
				Point6=901608,6239614,97
				Point7=903654,6238652,56
				Point8=903989,6238902,134			
				

Try it in the Guided Navigation code sample.