Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps v3 Direction Icons

On Google Maps when displaying driving directions there are direction icons located on the left (roundabout, left arrow, right arrow etc), I've searched through the documentation and can't find a way to display the icons on a module that I'm creating, has anyone found a way to display them on the direction pane.

Thanks in advance

like image 476
Rav Avatar asked Jul 19 '12 13:07

Rav


People also ask

What is the direction icon in Google Maps?

The red symbol in the compass icon is pointing north, while the grey symbol is pointing south. Your blue beam icon will show your current direction of travel.

What do the arrows mean on Google Maps?

By superimposing a massive arrow on the screen to tell you so. It's called Live View and it's here to help you get to your destination. The Live View feature presents the area around you as viewed through your phone's camera, using AR to place huge arrows that tell you exactly when to turn left or right.

How do I get icons for Google Maps?

Click the name of the pin you've just added on the menu panel on the upper left corner of the web page, and click the paint bucket icon next to it. A small dialog box with a color picker will appear. Click “More Icons” on the box, and a larger dialog box labeled “Choose your icon” will show.


1 Answers

You could use the "maneuver" field in routes[i].legs[j].steps[k].maneuver to display these icons.

If you have a look at the setPanel tutorial, you can see that it's using the maneuver field to set the corresponding icon in the directions panel. You can check that the icon for each step is set by the CSS class ".adp-{maneuver}".

Here's a list of maneuvers that I found within the CSS file that this example is using:

  • ferry
  • ferry-train
  • fork-left
  • fork-right
  • keep-left
  • keep-right
  • merge
  • ramp-left
  • ramp-right
  • roundabout-left
  • roundabout-right
  • straight
  • turn-left
  • turn-right
  • turn-sharp-left
  • turn-sharp-right
  • turn-slight-left
  • turn-slight-right
  • uturn-left
  • uturn-right

It seems like these maneuvers are not affected by localization, so it shouldn't be an issue.

like image 51
jbern Avatar answered Oct 02 '22 13:10

jbern