ameyazing
ameyazing

Reputation: 423

Google Maps Navigation Symbols

I'm looking for an exhaustive list of Google Maps navigation markers.

To avoid confusion, I'm not looking for this.

I'm looking for a complete list of navigation markers like Left Turn, Right Turn, Roundabout, Fork Left, Fork Right, Slight Left, Slight Right etc.

I understand that text representation will have some variables like Roundabout 3rd exit. This can be 1st exit or 2nd exit etc. But I'm looking to extract Roundabout from this and leave aside the variable part of this instruction. For this purpose I need a complete list of markers.

I searched a lot, but I could only find markers for places of interest like Bars, Golf Course etc.

Thanks in advance :)

Edit: To clarify my requirement even further: Google Maps API contains "html_instructions" tag. I want to assign images to as many different instructions as possible. For this purpose I need to identify an exhaustive list of driving instructions.

Upvotes: 1

Views: 10463

Answers (4)

ameyazing
ameyazing

Reputation: 423

As suggested by @edb in his answer, text is language and region dependent. Since, I'm not needed to handle localization in my project, I have compiled a list of instructions in English. Corresponding direction symbols can be used from @edb's answer.

Direction Commands

  • Take the <nth> <left | right>
  • Turn <Left | Right> [<at …> | <onto …>]
  • Exit Onto <…>
  • Take the […] exit towards <…>
  • At the roundabout, <continue straight | take the <nth> exit>
  • Turn Left to merge onto <…>
  • Take the ramp <on the <Left | Right> onto … | to …>
  • Merge Onto <…>
  • Keep <Left | Right> at the fork [to continue towards …]
  • Slight <Left | Right> [onto …]
  • Sharp <left | right> at <…>
  • Make a U-Turn at <…>

Some instruction that have no associated symbol.

  • Continue onto …
  • Head <Towards ..., North, South, …>
  • Pass by <…>

Hope this is helpful :)

Upvotes: 2

Xantix
Xantix

Reputation: 3331

I didn't find anything official, so I made a quick C# program to extract the key phrases.

The output is here:

My code was:

static void Main(string[] args)
{
    ConcurrentDictionary<string,int> phrases = new ConcurrentDictionary<string,int>();

    List<string> citiesOfUS = new List<string>()
    {
        "Chicago,IL",
        "Los+Angeles,CA",


        "Montgomery"      + "," +     "AL",  
        "Juneau"          + "," +     "AK",  
        "Phoenix"         + "," +     "AZ",  
        "Little+Rock"     + "," +     "AR",  
        "Sacramento"      + "," +     "CA",  
        "Denver"          + "," +     "CO",  
        "Hartford"        + "," +     "CT",  
        "Dover"           + "," +     "DE",  
        "Tallahassee"     + "," +     "FL",  
        "Atlanta"         + "," +     "GA",  
        "Honolulu"        + "," +     "HI",  
        "Boise"           + "," +     "ID",  
        "Springfield"     + "," +     "IL",  
        "Indianapolis"    + "," +     "IN",  
        "Des+Moines"      + "," +     "IA",  
        "Topeka"          + "," +     "KS",  
        "Frankfort"       + "," +     "KY",  
        "Baton+Rouge"     + "," +     "LA",  
        "Augusta"         + "," +     "ME",  
        "Annapolis"       + "," +     "MD",  
        "Boston"          + "," +     "MA",  
        "Lansing"         + "," +     "MI",  
        "St.+Paul"        + "," +     "MN",  
        "Jackson"         + "," +     "MS",  
        "Jefferson+City"  + "," +     "MO",  
        "Helena"          + "," +     "MT",  
        "Lincoln"         + "," +     "NE",  
        "Carson+City"     + "," +     "NV",  
        "Concord"         + "," +     "NH",  
        "Trenton"         + "," +     "NJ",  
        "Santa+Fe"        + "," +     "NM",  
        "Albany"          + "," +     "NY",  
        "Raleigh"         + "," +     "NC",  
        "Bismarck"        + "," +     "ND",  
        "Columbus"        + "," +     "OH",  
        "Oklahoma+City"   + "," +     "OK",  
        "Salem"           + "," +     "OR",  
        "Harrisburg"      + "," +     "PA",  
        "Providence"      + "," +     "RI",  
        "Columbia"        + "," +     "SC",  
        "Pierre"          + "," +     "SD",  
        "Nashville"       + "," +     "TN",  
        "Austin"          + "," +     "TX",  
        "Salt+Lake+City"  + "," +     "UT",  
        "Montpelier"      + "," +     "VT",  
        "Richmond"        + "," +     "VA",  
        "Olympia"         + "," +     "WA",  
        "Charleston"      + "," +     "WV",  
        "Madison"         + "," +     "WI",  
        "Cheyenne"        + "," +     "WY"  

    };

    Parallel.ForEach(citiesOfUS, (string origin) =>
    {
        foreach (string destination in citiesOfUS)
        {
            string json = new WebClient().DownloadString("http://maps.googleapis.com/maps/api/directions/xml?origin=" + origin + "&destination=" + destination + "&sensor=false");

            bool shouldExitLoop = false;

            while (!shouldExitLoop)
            {
                int pos1 = json.IndexOf("<html_instructions>");
                if (pos1 == -1) { shouldExitLoop = true; break; }

                int pos2 = json.IndexOf("</html_instructions>");
                if (pos2 == -1) { shouldExitLoop = true; break; }

                string subString = json.Substring(pos1 + 19, pos2 - pos1 - 19);

                json = json.Substring(pos2 + 20);

                int posB1 = subString.IndexOf("&lt;b");

                while (posB1 != -1)
                {
                    int posB2 = subString.IndexOf("&lt;/b");

                    string part1 = subString.Substring(0, posB1);
                    string part2 = subString.Substring(posB2 + 6);

                    subString = part1 + " SYM " + part2;

                    posB1 = subString.IndexOf("&lt;b");
                }

                int posSpace = subString.IndexOf("&gt;");

                while (posSpace != -1)
                {
                    string part1 = subString.Substring(0, posSpace);
                    string part2 = subString.Substring(posSpace + 4);

                    subString = part1 + part2;

                    posSpace = subString.IndexOf("&gt;");
                }

                int posDiv1 = subString.IndexOf("&lt;div");

                while (posDiv1 != -1)
                {
                    int posDiv2 = subString.IndexOf("&lt;/div");

                    string part1 = subString.Substring(0, posDiv1);
                    string part2 = subString.Substring(posDiv2 + 8);

                    subString = part1 + " SYM " + part2;

                    posDiv1 = subString.IndexOf("&lt;div");
                }

                phrases.AddOrUpdate(subString, 1, (key, oldvalue) => oldvalue + 1 );

            }
        }

    });


    string[] lines = phrases.Keys.ToArray();

    Array.Sort(lines);

    System.IO.File.WriteAllLines(@"C:\Users\Xantix\Desktop\WriteLines.txt", lines);            

    return;
}

Basically those are the English phrases you get when trying to go from each Capital city in the U.S. to every other one.

Anything appearing between bold tags were replaced with the word "SYM", things like left, right, street name's, etc.

note: I removed things appearing between div's inside the html_instructions, so things like "partial toll road" and "under construction until SomeDate" are missing.

Feel free to modify my code to add in other cities to the list or add in street address, etc.

Upvotes: 0

edb
edb

Reputation: 502

If I understand your question correctly, then the complete list (in visual form) can be found in the image below at this url. I couldn't find a list of translations, but this that would be language-depandant anyway.

direction icons

Upvotes: 2

Mr. Black
Mr. Black

Reputation: 12122

I hope that you are expecting this http://mapicons.nicolasmollet.com/.

Upvotes: 1

Related Questions