Closed seppaleinen closed 7 years ago
https://developers.google.com/maps/documentation/embed/guide#directions_mode
https://www.google.com/maps/embed/v1/directions
?key=YOUR_API_KEY
&origin=Oslo+Norway
&destination=Telemark+Norway
&avoid=tolls|highways
origin and destination must be either place name, address or place ID
So to use this we need to lookup one of these. For destination we already have the place id
origin can be location.
&origin=59.26472689999999,18.053869199999998
"mode defines the method of travel. Options are driving, walking (which prefers pedestrian paths and sidewalks, where available), bicycling (which routes via bike paths and preferred streets where available), transit, or flying. If no mode is specified, the Google Maps Embed API will show one or more of the most relevant modes for the specified route."
Setting mode to transit (bus/subways/trains) if distance is over 1 km, otherwise walking
When looking at the map it would be great if you could see where you are in relation to the bar and the way to go there