Force Map to Centre or Exclude Outlying listings

This topic contains 14 replies, has 2 voices, and was last updated by  5tratus 7 years, 6 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #276026

    5tratus
    Buyer
    Post count: 72

    Hi there!
    I’m having a similar problem to this: https://wpgeodirectory.com/support/topic/force-map-center-or-exclude-outlying-listings/

    – 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

    #276027

    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
    -5t

    #276028

    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?

    #276109

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    that function will not help.

    I’m not sure it will be possible to do what you want, but please provide a link and admin credentials and we will have a look.

    Thanks

    #276130

    5tratus
    Buyer
    Post count: 72
    This reply has been marked as private.
    #276875

    Paolo
    Site Admin
    Post count: 31206

    Hi again,

    I checked the 2 maps that I could find and they both only show listings in UK.

    Can you provide a link where I can see the map that you mentioned?

    Thanks

    #276916

    5tratus
    Buyer
    Post count: 72

    Hi Thanks.. that’s because we’ve had to put the turkish listing in “draft” mode – to keep the map from centering on Germany!

    if you look in drafts you’ll see a turkish listing there and if y ou activate it. you’ll see a lovely, empty map of germany.

    Thanks
    .

    #276918

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    there is no way to make it zoom over UK nicely excluding only the Turkish listings, other than removing the Turkish listing like you did.

    If you include it and auto zoom it, it will logically include it. If you remove auto zoom it will only change zoom level , but because you are using the everywhere location, you are still including the Turkish listing, you are only changing the zoom level.

    Another option would be avoid using the everywhere location and redirect users to default location, but in the case the map would zoom into a much smaller location (Bristol).

    Thanks

    #276919

    5tratus
    Buyer
    Post count: 72

    no.. that wouldn’t work. I thought maybe if I gave turkey a special category.. that somehow I could make just that category not show… but it’s well beyond me.

    When it zooms out to include turkey the bulk of our listings appear like a giant mass of colour and it looks absolutely terrible.

    #276920

    5tratus
    Buyer
    Post count: 72

    Our turkish member is going to be really annoyed

    #276921

    Paolo
    Site Admin
    Post count: 31206

    Sorry to say so, but I think he’ll be annoyed one way or another.

    To be fair with him, you should include it in the map too.

    Thanks

    #276922

    5tratus
    Buyer
    Post count: 72

    well. then it’s not fair to the over 100 other members we have who complain that they can’t tell if their listing is on the map.

    our only solution that we can think of is to place the turkish listing in France.. or the Channel Islands. and then make it very clear in title and listing that it is actually in turkey

    #276923

    5tratus
    Buyer
    Post count: 72

    just to be clear.. that function above would work if this were the main page, rather than the listing page right?

    #276926

    Paolo
    Site Admin
    Post count: 31206

    If you use the home page map in the location page you don’t need that function, you can do that from GD > design > map.

    To avoid the too many markers over UK when zooming to include turkey, you could use the Marker Cluster add-on.

    People have to zoom into UK to see the details of each listings.

    I hope you understand that the system is not failing here. The only problem is having 1 listing so far away from all the other listings…

    That is an unusual situation.

    Thanks

    #276928

    5tratus
    Buyer
    Post count: 72

    thanks.. yes.. I understand it’s not the system.

    Maybe a suggestion for future updates. a feature that allows you to specify map zoom/centre for listing map ? 🙂

    thanks anyway!
    5t

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

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

Open Support Ticket