Hi Steven,
How do I get the standard Directions link to appear on a venue’s Google map? See the “overlay” in the top left corner of Google maps like this one: https://www.google.com/maps/place/The+White+House/@38.897676,-77.03653,17z/data=!3m1!4b1!4m2!3m1!1s0x89b7b7bcdecbb1df:0x715969d86d0b76bf
Thanks.

Brian O’Neill
Hi Brian,
I don’t think you can. That’s something that Google provides on their maps website rather than a feature included in the maps embed.
While Google’s maps API does expose a directions API, you can’t add the panel you describe.

Stephen Harris
Hi Stephen,
Just following up on this.
Here is another, perhaps better, example: http://www.papcstrong.com/about/facility-information/
As you can see, the map is embedded with a Directions link on the top left.
Is there a parameter that needs to be added? It seems that the directions option appears by default when using “place mode”: https://developers.google.com/maps/documentation/embed/guide#place_mode
Thanks!

Brian O’Neill
Hi Brian,
I couldn’t see how to get the place panel included, but in any case, this isn’t something that can be implemented by Event Organiser as-is (i.e. without modifying its code).
What you can do is use the venue marker tooltip to include a link of the form: https://maps.google.com?saddr=Current+Location&daddr=38.8977,-77.0366
Map tooltips can be enabled as indicated in the examples on this page: http://docs.wp-event-organiser.com/shortcodes/venue-map/
Details on how to change the marker tooltip content can be found here: http://codex.wp-event-organiser.com/hook-eventorganiser_venue_tooltip.html
Here’s an untested example:
//Adds a link to Google maps directions
add_filter( 'eventorganiser_venue_tooltip', 'my_venue_tooltip_content_link_to_venue', 10, 2 );
function my_venue_tooltip_content_link_to_venue( $description, $venue_id ){
$latlng = eo_get_venue_latlng( $venue_id );
$url = sprintf( 'https://maps.google.com?saddr=Current+Location&daddr=%s,%s', $latlng['lat'], $latlng['lng'] );
$description .= sprintf('<p><a href="%s">Get directions</a></p>', esc_url( $url ) );
return $description;
}

Stephen Harris
Sorry, forgot to follow-up. Thanks for the suggestion.

Brian O’Neill