Reply To: Direction Link Below The Map

#478654

Barbara Magee
Expired Member
Post count: 146

Okay, we inserted the shortcode on our details listing page template to display the map with the Get Directions field underneath it. We have a few questions about the map setup:

Map to open in Google maps app:

A support forum posting on 12/10/18 about getting map Directions on detail page to open in Google map app was on this page:

It referred people to this page from 2016:

Here is the code.

function geodirectory_detail_page_google_map_link( $options, $canvas ) {

global $post;

if ( $canvas == ‘detail_page_map_canvas’ && !empty( $post->post_latitude ) && !empty( $post->post_longitude ) ) {

?>

<p>post_latitude . ‘,’ . $post->post_longitude ;?>” target=”_blank”><?php echo __( ‘Get Directions on Google Maps’, ‘geodirectory’ ); ?></p>

<?php

}

}

add_action( ‘geodir_map_after_render’, ‘geodirectory_detail_page_google_map_link’, 10, 2 );

Does this code automatically insert a different button under the detail listing page map for mobile users to click?

Or Does the code replace the function of the existing right justified Get Directions button?

Do the existing address entry field under the map and the Get directions button to the right remain for desktop users?

When walking or bicycling or public transport are selected per the attached image it indicates beta status. Has this been resolved in the recent GDV2 release version?

Thanks very much!!