This topic contains 4 replies, has 2 voices, and was last updated by Sofia Moss Sofia Moss 7 years, 4 months ago.

Marker Clusterer: Not working with two items in same location

  • User Level

    Hello,

    This is my store finder map: http://judicialreviewbc.ca/getting-help/map/

    Issue: The problem that I am experiencing is this: when I have two different store entries in the same location, the clustering add-on prevents me from seeing either of them when I zoom in. Here is a short video demonstrating the problem: https://www.dropbox.com/s/tw5x2lrqrx056kz/Issue%20with%20map%20with%20two%20items.mov?dl=0

    Possible workaround? I think that a work-around may be making clustering only appear when I have 4 or more items, but disabling clustering of two or three items. I don’t know how to do this.

    What should I do?

    Thanks,
    – Josh

    Sofia Moss
    StaffSuper ContributorUser Level

    Hi Josh,

    Thank you for your inquiry, if you have stores in the same coordinates, the cluster marker will show 2 stores, if you wish to change the minimum cluster value by editing the code in marker clusterer javascript, on your server for example here https://superstorefinder.net/superstorefinderwp/addon/markerclusterer/wp-content/uploads/ssf-wp-uploads/addons/ssf-marker-cluster-wp/mega-superstorefinder.js?ver=1.0

    Search for keyword

    minimumClusterSize : 2

    and change it to your desired minimum cluster value.

    Cheers,
    Sofia

    User Level

    Hi Sofia,

    I tried to do this, but something went wrong. I edited the file “mega-superstorefinder.js”, recreated the zip file “ssf-marker-cluster-wp.zip” and then uploaded it to the add-ons section of Super Store Finder. Once I did that, the map no longer loads. I just see the spinner going forever. If I open up the inspector pane, I see that there are 404 not found errors for the clustering files: http://prntscr.com/da5ig6

    I’m not sure what happened. It almost seems like there’s something about the zip file that I created such that it can’t be read.

    What shall I do? Thanks,
    – Josh

    • This reply was modified 7 years, 4 months ago by  prowsej.
    User Level

    Hi Sofia,

    I figured out what was wrong with the zip file that my Mac was generating, fixed that, and uploaded a working file to the site. So, now it’s not clustering, but now I realize that the interface doesn’t gracefully deal with multiple stores that are on top of each other. You can just click on one and the others are hidden. I’ll try to think about a workaround.

    – Josh

    Sofia Moss
    StaffSuper ContributorUser Level

    Hi Josh,

    All right, that’s great! Yes, the markers with same coordinate will overlap each other as per Google Maps API design, try not to use Labeled Marker from the admin settings page if this is the case and maybe use custom graphic icon.

    Cheers,
    Sofia

You must be logged in to reply to this topic.