As of version 2.6.0 we have implemented a setting in the admin panel if you need to open directions in a new window.

If you need, instead of having the directions on the same page with the locator, it would open a new tab and go directly to the Google map page with the directions already loaded.

You can achieve this by adding this JavaScript code to the page with Locatoraid shortcode.

<script language="javascript">
jQuery(document).on( 'click', '.lpr-directions', function(event) {
event.preventDefault();
event.stopPropagation();
if( ! lpr_loc ) {
alert( 'Please search for an address or zip code first' );
return false;
}
var my_parent = jQuery(this).closest('.lpr-location');
if( ! my_parent )
return false;
var end = new google.maps.LatLng( my_parent.data('lat'), my_parent.data('lng') );
var to_url = 'https://www.google.com/maps/dir';
var end = new google.maps.LatLng( my_parent.data('lat'), my_parent.data('lng') );
to_url += '/' + lpr_loc.lat() + ',' + lpr_loc.lng();
to_url += '/' + end.lat() + ',' + end.lng();
window.open(to_url, '_blank');
return false;
});
</script>