how can i add google route plan with PHP array : honestly I'm new in php, and using a WP theme. This theme is a directory theme. So that there is an address with street, number and city.

I have a php array get this values and converts them into a google map location link, (a button in front end that says "Open in Google map"). But I want to change this to open at google map and route the plan from my location.

here is the code : 

`if( !function_exists('estate_listing_address') ):
function estate_listing_address($post_id,$col=3){
    
    $property_address   =   esc_html( get_post_meta($post_id, 'property_address', true) );
    $property_city      =   strip_tags (  get_the_term_list($post_id, 'property_city', '', ', ', '') );
    $url                =   urlencode($property_address.','.$property_city);
    $google_map_url     =   "http://maps.google.com/?q=".$url;

    $return_string.= ' <a href="'.$google_map_url.'" target="_blank" class="button">'.__('Route plan','wpestate').'</a>';

    return  $return_string;
}
endif;


I think $url, has the address and is added to google map url, but should I add here more so that will also route the plan from my location !

thanks, `  