From: Anthony Talarico Date: Tue, 12 Dec 2017 14:05:16 +0000 (-0500) Subject: adding driving directions to the registration page X-Git-Tag: v1.0.0^2~223^2~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=844b32345773fb3460b253a13f29314ca9ac0920;p=WP-Plugins%2Fglm-member-db-registrations.git adding driving directions to the registration page adding the code for the directions button next to the view map button on the registrations page --- diff --git a/views/front/registrations/registration.html b/views/front/registrations/registration.html index e3a1b5b..e98b477 100644 --- a/views/front/registrations/registration.html +++ b/views/front/registrations/registration.html @@ -37,6 +37,7 @@
{if $regEvent.locations.lat && $regEvent.locations.lon} +
(map loads here)
@@ -44,7 +45,12 @@
View Map
-
Get Directions
+
+ + + + +
{/if} {literal} @@ -383,5 +389,13 @@ jQuery(function($){ } google.maps.event.addDomListener(window, 'load', initMap); + jQuery("#MemberDrivingDirectionsForm").submit(function(){ + var place = jQuery("#MemberLocation").val().replace( new RegExp( " ", "g" ), '+' ); + var lat = jQuery("#MemberLat").val(); + var lon = jQuery("#MemberLon").val(); + var url = "https://maps.google.com/maps?daddr=" + place + "%40" + lat + "," + lon; + window.open(url, '_blank'); + return false; + }); });