2

I'm working on Google Map direction for my mobile applications.

As you know Google Direction API has a instruction for each step of direction. For example "turn right","turn left", "Head", take the second exit onto" are some of them. I need to define an icon for each of this instructions. for each instruction an icon that make it more clear. So I need a list of all instructions that google may send to my request.

I checked the google document but it seems that they do not share that list. Does any body know this list?

Husein Behboudi Rad
  • 5,434
  • 11
  • 57
  • 115

1 Answers1

0

What is wrong with https://developers.google.com/maps/documentation/directions/

Looks like you may need to call it as a Rest service though

This document is intended for website and mobile developers who want to use compute direction data within maps provided by one of the Google Maps APIs. It provides an introduction to using the API and reference material on the available parameters.

Have a look at http://maps.googleapis.com/maps/api/directions/json?origin=5th%20Ave&destination=Times%20Square&mode=bicycling&sensor=false

The result JSON has a array of legs which have an array of steps. You need to iterate through these.

Scary Wombat
  • 44,617
  • 6
  • 35
  • 64
  • I saw the document. But I'm talking about a list of all possible values for html_instruction that has been introduced in this document. Do you see this list? the html_instruction define the instruction of each step. I want the possible values. – Husein Behboudi Rad Feb 04 '14 at 08:58
  • Have a look at http://maps.googleapis.com/maps/api/directions/json?origin=5th%20Ave&destination=Times%20Square&mode=bicycling&sensor=false The result JSON has a array of legs which have an array of steps. You need to iterate through these. – Scary Wombat Feb 05 '14 at 00:26
  • On each steps tag, there is tag named: html_instructions . If you iterate all the instructions in this tag you have all instruction for going from source to destination. Now I need all the values that this tag may have. Some of values are: "Head", "Turn right", "Turn left" but I need to know all possible values for this tag so that I can define an icon for that – Husein Behboudi Rad Feb 05 '14 at 09:24