Map Not Displaying Markers with Large Directory

This topic contains 12 replies, has 2 voices, and was last updated by  Paolo 9 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #35629

    headway
    Free User
    Post count: 49

    I have a directory with 500,000 listings. When I try to access the main map (/location) the page takes a very long time to load, and when it finally does, the map does not display any of the markers. When I had fewer listings on the site, the map was working fine, so it seems this could be an issue of not scaling properly.

    #35724

    Paolo
    Site Admin
    Post count: 31206

    Hi Headway,

    it also depend on how fast your server can query 500.000 listings to determine their position and the marker to use on the map.

    What kind of server are you using, if you scale up the number of listings, you should consider scaling the server used too.

    Next assignement for Stiofan is improving general speed (not only maps), we will try to do server side clustering and caching of map markers, but even after that, making available a map showing all 500k listing wouldn’t be a good idea, even if you had a server powerful enough to create it.

    I would consider making sure that nobody can access a page where the map is showing all the markers at once.

    Thanks

    #35737

    headway
    Free User
    Post count: 49

    I have a dedicated server.

    Processor: Intel®Xeon® E5-2640
    Speed: 6 Cores (HT) x 2.5 GHz(3.0 GHz Turbo Boost)
    RAM: 32 GB DDR3 ECC
    Hard-disk space: 2,000 GB (2 x 2,000 GB SATA)
    RAID: Software RAID 1

    It’s not just unable to display map markers for the whole database of listings, but also for “near me” searches and under other circumstances.

    How could I ensure that no one can access “/location” since it is linked in the breadcrumbs?

    Something else, which I can start as its own thread, is the issue of map markers that are not placed within the correct state. Let’s say almost all markers are in Pennsylvania, but someone accidentally adds a marker that is in Alaska, then the map for Pennsylvania will be zoomed out to show Alaska as well. Of course I could manually go in and fix all these errors, but it is a very large database, so is there any way to make it so “/location/united-states/pennsylvania” is only zoomed in on that state? It would be great if I could manually set the position and zoom for each state (region).

    Thanks for your help.

    #35742

    Paolo
    Site Admin
    Post count: 31206

    Hi Headway,

    the server can’t get much better than this I guess, maybe consider using Nginx instead of Apache if you aren’t already.

    After Stiofan’s optimization, it should work much much better and actually if you’d be willing to help us test on your database with that many listings, we could probably fine tune even better.

    To provide a suggestion on how to prevent to show maps with too many listings, I’d need to have a look at your current structure. I was assuming you had a worldwide directory, but if the 500k listings are all in 1 state the solution needed could be different. For the location/me page, restricting the radius to a very low number would definitely help, returing less results. If you have that many listings in a small area it could be good to present only the closests.

    In any case, would you mind sharing a link a wp admin credentials to have a look at it? I might suggest better ideas after seeing the website.

    Let us know,

    Thanks

    #35748

    headway
    Free User
    Post count: 49
    This reply has been marked as private.
    #35750

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    thank you, I’m having a look at it.

    i can reply already for the new problem raised. That is due to the wrong map used in the listings page.

    You should use the GD > Gmap listings page map, not the Home map.

    I’ll provide more info after reviewing the website a bit more.

    Thanks

    #35752

    Paolo
    Site Admin
    Post count: 31206
    This reply has been marked as private.
    #35924

    headway
    Free User
    Post count: 49
    This reply has been marked as private.
    #35931

    Paolo
    Site Admin
    Post count: 31206
    This reply has been marked as private.
    #36015

    headway
    Free User
    Post count: 49

    The problem with having a fixed zoom is that it centers the map on the average of the different locations, so that if there is one that is way off, the map will be in the middle of nowhere. Is there not a way to manually set the view for a region?

    Okay, that makes sense about the listings map.

    #36016

    Paolo
    Site Admin
    Post count: 31206

    No, the only solution is to have correct data in your database…

    #36031

    headway
    Free User
    Post count: 49

    Is there any way to cluster map markers when using the Listing Map?

    #36101

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    just Home Map wdget can be clusterized.

    Listings pages shouldn’t be set to show more than 20 listings (10 would be wiser) to make sure they are not too heavy and load efficiently. Clustering those would only add more processing and loading time to the page.

    Thanks

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

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

Open Support Ticket