Force map center or exclude outlying listings

This topic contains 4 replies, has 3 voices, and was last updated by  5tratus 7 years, 8 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #248667

    Betsy Kaage
    Buyer
    Post count: 5

    The map is centering on the geographic center of all listings. The problem is I have one listing way far to the south and it’s making the map focus in the middle of nowhere.

    http://www.galena.org/business-directory-map/

    Is it possible to force the map to center on the Default City?
    or
    To exclude certain listings from showing on the map?

    #248933

    Kor
    Moderator
    Post count: 16516

    Hi Dave,

    I’ve just checked your Website and I’m able to see the issue there. Have you tried adjusting the “zoom” level of the “GD > GMap” widget so it fits the current location or the default city location? Or you can have that “Tours” category untick by default in GD > Design > Home Map Settings.

    Thanks!

    #253911

    5tratus
    Buyer
    Post count: 72

    Hi there!
    I’m having a similar problem – 99% of my listings are in the UK – but 1 of them is in Turkey – so if I have auto zoom set, it zooms out to include turkey and looks like crap. If I turn off auto zoom – the map centers on Germany thereby showing NONE of my listings.

    I would like to center my map on the midlands by default. is this possible? Where do I go, or can I go, to set a default latitude and longitude?

    thanks!
    Lana

    #253930

    5tratus
    Buyer
    Post count: 72

    oh… I also tried to set the GD>Design>Home Map Settings – so that it excludes the new category I assigned to the Turkey listing – but this only works on the “home” map.. and my default view is the “listing” map.. so it doesn’t work there 🙁 so I can’t use this.. is there anything I can do? I just want my map to center on the UK and pretend that turkey isn’t there unless they scroll the map over to it
    there must be a way

    #253961

    5tratus
    Buyer
    Post count: 72

    I wonder if maybe I could add a function that did this bit

    
    
    
       // Untick the category by default on home map
                    if ($is_home_map && $geodir_home_map_untick = get_option('geodir_home_map_untick')) {
                        if (!empty($geodir_home_map_untick) && in_array($post_type . '_' . $cat_term->term_id, $geodir_home_map_untick)) {
                            $checked = '';
                        }
                    }
    

    which I found in geodirectory-functions/map-functions/map_functions.php

    If I could add something in my functions.php file that did THAT – but applied it to the listing map then maybe I could exclude the turkish listing from the map – and then the map would center where I need it to??

    what do you think?

Viewing 5 posts - 1 through 5 (of 5 total)

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

Open Support Ticket