Split: "Get Directions" button to Open Google Maps Link

This topic contains 46 replies, has 3 voices, and was last updated by  Giri 8 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #237531

    sylvester vader
    Buyer
    Post count: 151

    cool addon
    but found lil problem with it

    on some locations it dont show directions
    al the time it goes to one location if he dont find
    but it still shows the pin

    see image

    it seems to do this when he cant find the name in maps, however it should follow adress and coordinates and not the name

    #237534

    sylvester vader
    Buyer
    Post count: 151

    ok i did some testing with the coding and i found the problem

    on the basic get location button it seems to only go to the location of the latest added listing

    the button from this addon works good if you use the first one with only the coordinates

    if you add the name, and the name does not exist in google maps then it wont work
    it will not go to the coordinates

    only things that google can find will work

    like address for example

    
    
    function geodirectory_detail_page_google_map_link() {
        global $post, $preview;
    
        if ( !$preview && !empty( $post->post_latitude ) && !empty( $post->post_longitude ) ) {
    		
    	        if (isset($post->post_address) && $post->post_address) {
                        $sd_address .= $post->post_address;
                    }
    		
                    if (isset($post->post_city) && $post->post_city) {
                        $sd_address .= '+ ' . $post->post_city;
                    }
                    if (isset($post->post_region) && $post->post_region) {
                        $sd_address .= '+ ' . $post->post_region;
                    }
                    if (isset($post->post_country) && $post->post_country) {
                        $sd_address .= '+ ' . $post->post_country;
    				}					
    		
    		
            $maps_url = add_query_arg( array(
                            'q' => $sd_address,
                            'sll' => $post->post_latitude . ',' . $post->post_longitude,
                        ), 'http://maps.google.com/' );
    					
    					
    #237566

    sylvester vader
    Buyer
    Post count: 151

    ok i put the 2 last listings on concept and then the directions goes to the adress 2 down

    so i realy think something is wrong here
    please help me to fix this

    #238061

    Giri
    Expired Member
    Post count: 3155

    sylvester vader,

    I’m not sure what you are trying to achieve. But you seems like messing with the code.

    That Get directions link is created for the map pinpoint on the detail page.

    Its NOT created for get direction A to B type map points.

    #238223

    sylvester vader
    Buyer
    Post count: 151

    i know thats the problem

    i did not touch the code but somehow when i click on get directions it doesnt show directions to the map pinpoint
    instead it goes to the pinpoint location of the latest listing that i have

    this happend after an listing import i did

    but all the rest works fine

    only directions not

    🙁

    #238225

    Giri
    Expired Member
    Post count: 3155

    Post your wp admin login details in a private reply. I’ll take a look.

    Also post the listing url where you have the problem

    #239000

    sylvester vader
    Buyer
    Post count: 151
    This reply has been marked as private.
    #239014

    sylvester vader
    Buyer
    Post count: 151

    i found out that it only gives wrong direction in the netherlands
    my listings in other countries work good

    atm im checking if i can find any difrence between the netherland listings and for example spain

    i will find it

    if it works in spain then it should also work in the netherlands

    last week i also had something like this
    then it did not show any listings in the map
    reason was that one of the listings had 52.783.070 in coordinates in stead of 52.783070
    the extra point made it not work for the complete map

    im hoping its something like this again

    #239052

    Giri
    Expired Member
    Post count: 3155

    Could you provide correct admin login details?

    #239070

    sylvester vader
    Buyer
    Post count: 151
    This reply has been marked as private.
    #239662

    sylvester vader
    Buyer
    Post count: 151

    you found something?

    can one of you tell me where the script part is for the get direction button
    then i can see what info it searches and maybe find out why it dont work for me

    #239663

    Giri
    Expired Member
    Post count: 3155

    Hi there, I have missed this thread yesterday. Let me check on that issue now. Sorry for the delay

    #239664

    Giri
    Expired Member
    Post count: 3155

    I’m still unable to login to your site. You might have Geo IP restrictions

    #239697

    sylvester vader
    Buyer
    Post count: 151
    This reply has been marked as private.
    #239703

    Giri
    Expired Member
    Post count: 3155

    Hi there, please test the login credentials before posting here.

    Me and Kc tried to login. Your login credentials not working for both of us.

Viewing 15 posts - 1 through 15 (of 47 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount