Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_directions transport_mode #1

Open
SymbolixAU opened this issue Sep 8, 2018 · 0 comments
Open

google_directions transport_mode #1

SymbolixAU opened this issue Sep 8, 2018 · 0 comments

Comments

@SymbolixAU
Copy link

SymbolixAU commented Sep 8, 2018

In your README you say

At the time of developing this app (Feb 2018), only the driving and walking modes were supported by the googleway package

Can you confirm this is still the case as I don't see an issue

install.packages("googleway")

set_key(read.dcf( "GOOGLE_API_KEY")
set_key(read.dcf("GOOGLE_MAP_KEY", api = "map")

walk <- google_directions(origin = c(-37.8179746, 144.9668636),
                  destination = c(-37.81659, 144.9841),
                  mode = "walking")

transit <- google_directions(origin = c(-37.8179746, 144.9668636),
                  destination = c(-37.81659, 144.9841),
                  mode = "transit")

direction_instructions(walk)
# [1] "Head <b>east</b> on <b>Flinders St</b>/<b>State Route 30</b> toward <b>St Kilda Rd</b>/<b>Swanston St</b>"
# [2] "Slight <b>right</b> onto <b>Wellington Parade S</b>"                                                      
# [3] "Slight <b>right</b>"                                                                                      
# [4] "Turn <b>left</b>"                                                                                         
# [5] "Turn <b>right</b><div style=\"font-size:0.9em\">Destination will be on the left</div>" 

direction_instructions(transit)
# [1] "Walk to Swanston St and Flinders St"                                                
# [2] "Tram towards Etihad Stadium Docklands to Vermont South"                             
# [3] "Walk to Jolimont Station, 175 Wellington Parade, East Melbourne VIC 3002, Australia"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants