Map view points only displays 1 of multiple events at same location

Home Forums Calendar Products Events Calendar PRO Map view points only displays 1 of multiple events at same location

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1347498
    B Saffell
    Participant

    Hi guys,

    Using the Map view as default, events display as points on the GMap – great. But…

    Where there is more than one event at the same venue, the map point only displays one of them (rather than listing/displaying all the events at that location).

    Any suggestions for a fix?

    #1347783
    Patricia
    Member

    Hey B Saffell,

    Thank you for reaching out to us!

    I know it looks like there is one marker when there are two events at the same location in the same Map View, but there are actually multiple pins stacked on top of one another. So, where you see one, there could theoretically be an infinite number.

    I believe you’re requesting the same thing as one of our existing feature requests:

    https://tribe.uservoice.com/forums/195723-feature-ideas/suggestions/5115736-mark-venues-with-multiple-events-in-map-view

    Please do add your vote there.

    This allows us to gauge interest in this particular feature request, which helps us prioritize our development efforts.

    Let me know if you have any other questions in the mean time and I’ll be happy to assist!

    Regards,

    Patricia

    #1347896
    B Saffell
    Participant

    Thanks for the response.

    To be honest, that’s not exactly ideal. What’s the point of map points being clickable (to view the event details+link) if you can only actually see one event per location? We’ll have users claiming that their event isn’t visible because it’s hidden under another event at the same location…

    Seeing as that feature request has been sitting around for 4 years without movement, I don’t imagine much is going to be done about it in the near future… Do you happen to know which bit of the plugin code/hooks deal with this display so I can at least have a go at hacking the display to show more than one somehow?

    • This reply was modified 8 years, 7 months ago by B Saffell.
    #1348604
    Patricia
    Member

    Hi B Saffel,

    Yes I understand that this is not ideal indeed. I’ll take a look at our plugin core files and check what we can do to achieve what you want, or at least point you to the right direction!

    We will contact you as soon as we have further information!

    Please let me know if you need anything else in the mean time.

    Regards,

    Patricia

    #1350042
    Patricia
    Member

    Hi B Saffel,

    I’ve spent some time reviewing and editing our Google Maps JS file and came up with a partial solution that might help you to achieve what you want.

    The solution is partial because I still didn’t figure out an easy/quick way to associate the Event’s link to it’s title when there is more than one event in the same venue.

    You can see the final result of this customization here.

    The edited file is:

    events-calendar-pro/src/resources/js/tribe-events-ajax-maps.min.js

    Before editing tribe-events-ajax-maps.min.js, please create a backup copy. After that, open the file and replace the minified code with:

    https://gist.github.com/nefeline/b735ec617a7e82ba582eba17dea786b4

    I basically added the following function (line 63) to this file:

    //check if any of the existing markers match the latlng of the new marker
    
          if (tg.markers.length != 0) {
            for (i=0; i < tg.markers.length; i++) {
              var existingMarker = tg.markers[i];
              var pos = existingMarker.getPosition();
    
                if (myLatlng.equals(pos)) {                                                                                                                                                                      
                       content_title = "Event " + title + "<br/>" + "Event " +  tg.markers[i].title;
                }
            }
          }
    

    I hope this helps you get started! Let me know if this code is working as expected for you as well.

    Thanks!

    Patricia

    #1360799
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Map view points only displays 1 of multiple events at same location’ is closed to new replies.